Bug #68698 [NEW]: Fatal error cannot redeclare [class not being redeclared]

From: Date: Tue, 30 Dec 2014 16:28:37 +0000
Subject: Bug #68698 [NEW]: Fatal error cannot redeclare [class not being redeclared]
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189530@lists.php.net to get a copy of this message
From: pegasus at vaultwiki dot org Operating system: Centos 6 64-bit PHP version: 5.6Git-2014-12-30 (Git) Package: Scripting Engine problem Bug Type: Bug Bug description:Fatal error cannot redeclare [class not being redeclared] Description: ------------ In the process of trying to debug this issue on my end: https://bugs.php.net/bug.php?id=68453 I want to note that other bug was never resolved by the PHP team. I provided as much feedback as I could with the minimal suggestions that were made, but the bug was closed as if I never did. The change in bucket order mentioned in the report -still- results in an infinite loop in scripts using PHP master when some objects recursively call instances of themselves (it seems that a method's static variables might not be available on a second pass until the first call of the containing method that should have already created the static has completed). If someone can reopen the issue and look into it again, it would be appreciated. Now, in the process of trying to debug that issue without any help from the PHP team, I discovered that PHP was also throwing a fatal error if the recursion was bypassed: Fatal error: Cannot redeclare class [class_already_declared] in [file_that_doesnt_declare_that_class_at_all] on line 0 As I've noted in the message itself, the class HAS been declared already. However, the error message says that a specific file is trying to redeclare it. The file claimed does not even include the name of the class in so much as a string, and does not include any files that do either. The fact that the error gives "line 0" in the "problematic" file is also not useful information from a development standpoint. This error is reproducible and always states that the same class is trying to re-declare from that same file. It does not matter whether opcache is disabled or enabled. This error does NOT occur in PHP 5.6.4. -- Edit bug report at https://bugs.php.net/bug.php?id=68698&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68698&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68698&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68698&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68698&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68698&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68698&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68698&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68698&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68698&r=support Expected behavior: https://bugs.php.net/fix.php?id=68698&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68698&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68698&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68698&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68698&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68698&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68698&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68698&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68698&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68698&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68698&r=mysqlcfg

« previous php.bugs (#189530) next »