Last modified: 2014-02-12 23:32:49 UTC
XAMPP 1.8.1 portable on Windows 32bit XP SP3, MediaWiki 1.20.2, PHP 5.4.7, MySQL 5.5.27. The wiki is on a USB flash drive (localhost). I've added the .dll from windows.php.net/downloads/pecl/php_apc-3.1.13-5.4-ts-vc9-x86-xp.zip to xampp\php\ext with extension=php_apc.dll in php.ini. Some info for APC is now in phpinfo(). In LocalSettings.php I have $wgCacheDirectory = "$IP/cache"; and $wgMainCacheType = CACHE_ACCEL; when I browse to the wiki's main page I get "Fatal error: require(): Cannot redeclare class profiler in path...\AutoLoader.php on line 1145".
Hello, This error occurs when the code loads twice a class Profiler (the same, or two other). You note your cache configuration in the bug report, is that means if you comment the following line, the error disappears? # $wgMainCacheType = CACHE_ACCEL; # $wgCacheDirectory = "$IP/cache"; Could you also do a search on "class Profiler" and confirm us this exists only one in your MediaWiki directory tree? [ Removing platform information, not relevant. ]
Hi, I found it happens only on the USB, if the same folders are on c:\ it's okay. It still happens with both the $wg settings commented out in LocalSettings.php There is xampp\htdocs\wiki\includes\profiler\Profiler.php and xampp\php\pear\Benchmark\Profiler.php but the one in pear is not mentioned in any .php file, except itself. In AutoLoader.php: 'Profiler' => 'includes/profiler/Profiler.php', and in WebStart.php: require_once( "$IP/includes/profiler/Profiler.php" );
Wondering if the workarounds mentioned in http://stackoverflow.com/questions/4575341/php-with-apc-fatal-errors-cannot-redeclare-class might help, e.g. setting apc.include_once_override = 0
I seem to have hit the same (or a similar) bug when upgrading from 1.17 to 1.20.3. I get the following error message when accessing "Special Pages" and some of my wiki pages: PHP Fatal error: require(): Cannot redeclare class mwnamespace in /var/www/html/wiki/includes/AutoLoader.php on line 1145 I did some debugging and the file that needs to be "required" is includes/filebackend/lockmanager/FSLockManager.php, but I can't find a reference to mwnamespace in it. I am using Centos 6.3 with PHP 5.3.3, Apache 2.2.15 and mysql 5.1.67. Let me know what the basic steps of isolating this issue are.
Seems a different bug, Adrian. Does it happen if you disable all the extensions?
Yes, it happens even if I disable all extensions (and/or I empty the extension folder). Should I open a new bug report?