PHP register_globals detection

Lately we discovered that, by mistake, we've run PHP with register_globals on for a few months for all our customers.

Since we want to turn it off, we need to figure out which customers use the 'register_globals on' so we can ask them to modify their scripts.

However, checking all php code by hand is a non-trivial task, because there are 20,000+ php scripts. Is there a way to:

a) parse all .php scripts once and detect whether they depend on register globals on?

or probably easier:

b) add something to our current setup so that when a scripts is executed and uses the register globals functionality, we get a notification automatically?

Any suggestions?
Thanks!

 

 

 

 

Top