title: After upgrading from PHP 5.3.8 to 5.3.20, started receiving Cannot redeclare class errors
body: <p>I recently upgraded to PHP 5.3.8 to 5.3.20.  Once the upgrade was in place, I started receiving numerous <strong>Cannot redeclare</strong> errors:</p>
  
  <blockquote>
    <p>[20-Dec-2012 11:15:00 America/New_York] PHP Fatal error:  Cannot redeclare class user in /var/www/htdocs/includes/mysql.php on line 3</p>
  </blockquote>
  
  <p>In one of my PHP classes, I instantiate a mysql class in a constructor using code like:</p>
  
  <pre><code>class foo {
    function foo() {  
      global $db;
  
      require '/var/www/htdocs/includes/mySQL.php';
      $db = new mydb_driver();
    }
  
    function show_text() {
      require '/var/www/htdocs/includes/mySQL.php';
      $db2 = new mydb_driver();
    }
  }
  </code></pre>
  
  <p>In the same class, I create a function that instantiates the same mysql class using a different variable so I can connect to a different database.  This second require is what is triggering the errors and I am unsure why. If I remove the require from show_text or change it to require_once it works fine.</p>
  
  <p>Does anyone know what changed between these two versions that would cause this code to fail?  I am not even sure how $db2 is being properly intialized without the require. Does requiring the class constructor make it globally visible in the file?</p>
  
  <p><strong>Edit:</strong>
  This is not a logging issue and the errors were not happening before the upgrade.  The apps were working fine until the upgrade.  This how I have enabled errors in my error logging:</p>
  
  <pre><code>error_reporting  = E_ALL &amp; ~E_NOTICE
  </code></pre>