Last modified: 2014-02-12 23:32:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45563, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43563 - APC causes Fatal error: require(): Cannot redeclare class profiler in ... AutoLoader.php on line 1145
APC causes Fatal error: require(): Cannot redeclare class profiler in ... Aut...
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Low major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-01 10:34 UTC by Rob Kam
Modified: 2014-02-12 23:32 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rob Kam 2013-01-01 10:34:06 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".
Comment 1 Dereckson 2013-01-01 13:53:07 UTC
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. ]
Comment 2 Rob Kam 2013-01-01 19:18:15 UTC
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" );
Comment 3 Andre Klapper 2013-03-07 20:13:03 UTC
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
Comment 4 Adrian Popa 2013-03-11 13:19:06 UTC
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.
Comment 5 Platonides 2013-03-11 13:26:15 UTC
Seems a different bug, Adrian. Does it happen if you disable all the extensions?
Comment 6 Adrian Popa 2013-03-11 13:30:33 UTC
Yes, it happens even if I disable all extensions (and/or I empty the extension folder). 
Should I open a new bug report?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links