title: Finding PHP scripts that require register_globals
body: <p>I have inherited a web server filled with code that requires <code>register_globals</code> to be on.  Most of it is custom code written by random people who have come and gone over the years.  I have fixed the majority of it in scripts that I know about, but my problem is with finding the ones I don't know about.</p>
  
  <p>I am considering writing an application to scan through every directory on the web server to identify PHP scripts that require <code>register_globals</code>.  Is there a good strategy for doing this?</p>
  
  <p>One method I have considered involves somehow forcing PHP to report all errors, executing scripts, and checking for undefined variable notices.  I could build an application that reads the <code>STDERR</code> stream for this.</p>
  
  <p>Are there any better methods you can think of?</p>