Last modified: 2010-05-15 15:48:16 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 T10993, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8993 - Error because class utfnormal is already declared
Error because class utfnormal is already declared
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
PC Linux
: Normal critical (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-02-15 12:56 UTC by Jean-Noël
Modified: 2010-05-15 15:48 UTC (History)
1 user (show)

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


Description Jean-Noël 2007-02-15 12:56:38 UTC
When looking at any page on the wiki, I got the following error:

Fatal error: Failed to load cached file
(/path/to/my/wiki/includes/normal/UtfNormal.php) class utfnormal is already
declared in /path/to/my/wiki/includes/Title.php on line 9

I don't know why this happens. I am running PHP 5.2.1, Apache 1.3, MySQL 5 on
Linux. I transferred this wiki from a previous server running under Gentoo, PHP
5.1.6 and Apache 2, I did not have this problem. So maybe this is PHP 5.2.1 related.

There is a simple work around, for now: if I comment in Title.php the line at
the beginning:

require_once( 'normal/UtfNormal.php' );

everything seems to work ok.

I don't know what is wrong on my configuration, or why this happens, any help is
appreciated. Googling and asking on the IRC channel did not help for now, so I
am turning to developers.
Comment 1 Rob Church 2007-02-15 16:20:23 UTC
Was this upgraded from a previous version of the software, and if so, were old
files left alone? I suspect that UtfNormal.php moved at some point, or that
there's two files with the same class definition, which for some odd reason, is
causing the error.
Comment 2 Jean-Noël 2007-02-15 16:34:27 UTC
No, the software version was not moved. I installed 1.9.0 on a server. Then it
was decided to move the wiki to another server. I copied the files on the first
wiki to the other server, and that's all. Neither on the first nor second server
was anything else than 1.9.0 installed.
Comment 3 Brion Vibber 2007-02-16 23:54:13 UTC
Probably some sort of path inconsistency confusing require_once, and/or
duplicated files of some sort. Relative include paths sometimes get...
interesting with PHP. :P

Can you test if replacing the line with this works:

require_once( dirname(__FILE__) . '/normal/UtfNormal.php' );

That's the version that appears in the current development code, using the full
explicit path for consistency. If that works, then we'll go ahead and resolve
this as FIXED in the mainline code.
Comment 4 Jean-Noël 2007-02-19 08:57:25 UTC
No sorry, this did not fix it: same error message appears...
Comment 5 Rob Church 2007-06-06 03:42:49 UTC
Please check for a broken or outdated version of eAccelerator or similar, such as Zend Optimiser, which can cause bizarre problems under otherwise normal circumstances.

If not, it would be helpful to know if the problem persists in 1.10.0.

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