Last modified: 2010-05-15 15:28:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 766 - Cannot redeclare class pear in PEAR.php
Cannot redeclare class pear in PEAR.php
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2004-10-23 16:20 UTC by Jonathan Smith
Modified: 2010-05-15 15:28 UTC (History)
1 user (show)

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


Description Jonathan Smith 2004-10-23 16:20:22 UTC
MediaWiki error has occured when trying to upgrade from Beta to 1.35, 1.36 and
now 1.37. Same error message each time:

Fatal error: Cannot redeclare class pear in
/home/jcwinni/public_html/mwp3/PHPTAL-NP-0.7.0/libs/PEAR.php on line 72
Comment 1 Oscar van Vliet 2004-10-25 16:21:38 UTC
After cracking another issue, I got the same thing on upgrading from 1.3.2 to 1.3.7.

Fatal error: Cannot redeclare class pear in 
<removed my server path>/Wiki/PHPTAL-NP-0.7.0/libs/PEAR.php on line 72

All of my PHP info and config are already in bug 618.

However, this doesn't seem to be an installation issue, since I get the bug
after I run the install script and move localsetting.php and just try to open
the main page.
Comment 2 Oscar van Vliet 2004-10-25 16:24:10 UTC
Fixing summary to reflect actual problem.
CC'ing myself
Comment 3 Brion Vibber 2004-10-26 01:51:36 UTC
Can you list the ini_set statements in your LocalSettings.php? Confirm they are the correct paths, that 
you're not mixing versions.
Comment 4 Oscar van Vliet 2004-10-26 10:36:29 UTC
Actually, I did a clean install of 1.3.7, using the web installer, intending to
pick up the database and copy back the image directory from my 1.3.2 version.
The only thing I did to localsettings.php after that was to enable uploads (i.e.
uncomment the relevant disable line).

Unfortunately I trashed the 1.3.7 files I had on my system (hoping you might fix
this by 1.3.8). If the info above is not sufficient I can try again from
scratch. Let me know if that is the case.
Comment 5 Jonathan Smith 2004-11-16 15:23:34 UTC
I am pleased to report success when upgrading from 1.3-Beta to 1.3.8. 

I previously had reported an error occurring when I tried to upgrade from the
Beta version to 1.35, then 1.36 and then 1.37.

From my perspective, the bug is fixed. Thanks.
Comment 6 Oscar van Vliet 2004-11-17 19:37:10 UTC
In my case, the bug remained. However, I was playing around and compared the old
and working localsettings.php with the new one that wasn't. I transferred some
things after I read PEAR is needed  for the skin.

There were five differences between the localsettings:

I have imagemagick now.
$wgUseImageResize		= true;

Uploads were disabled in the new one.
$wgDisableUploads		= false;

I use fixed messages and require a login for editing so these two were extra.
$wgUseDatabaseMessages = false;
$wgWhitelistEdit = true;

The proxy key was different.
$wgProxyKey = "<long hash>";

I left the resize and copied the other ones in. And it works now. Since
whitelist editing and uploads are associated with editing and resize isn't it,
the bug must be in the DatabaseMessages or ProxyKey. I tried removing the
DatabaseMessages and my wiki still works. I have no idea what the ProxyKey does
(please send me a message and let me know - couldn't find it in the manual).

So now there seems to be a workaround, but the problem is sort of still there..
Reopening with reduced severity due to the workaround.
Comment 7 Philippe Elie 2004-12-02 15:02:18 UTC
I ran into a similar problem when upgrading from 1.3.5 to 1.3.8, the error is a
bit different:

PHP Fatal error:  Cannot redeclare _pear_call_destructors() in

(note the reference to the old path even if you fixed all of them in your config)

I needed to remove all file like /tmp/tpl_0_7_0*. Those file contained a ref to
the old path ala
<?php require_once "/var/www/htdocs/mediawiki-1.3.5/PHPTAL-NP-0.7.0/libs/GetText
Comment 8 Brion Vibber 2004-12-05 20:59:29 UTC
Please test with 1.4beta, see if the problem is resolved.
Comment 9 Oscar van Vliet 2004-12-08 22:23:47 UTC
I tested with 1.4beta1 and all was well.
Comment 10 Brion Vibber 2004-12-09 00:16:02 UTC
Thanks for the feedback! Resolving as fixed.

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