Last modified: 2010-05-15 15:51:58 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 10140 - BagOStuff.php still uses a PHP4-style constructur, which does not work on PHP 5.0.4
BagOStuff.php still uses a PHP4-style constructur, which does not work on PHP...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.10.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-04 19:37 UTC by Colin Finck
Modified: 2010-05-15 15:51 UTC (History)
2 users (show)

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


Attachments

Description Colin Finck 2007-06-04 19:37:04 UTC
I tried using MediaWiki 1.10.0 on a PHP 5.0.4 32-Bit system (cannot upgrade to a newer PHP version for some reasons).

Unfortunately, I almost always got "Database Error" pages. 
The SQL query showed that the table name was empty. MediaWiki executed SQL queries like "SELECT value,exptime FROM '' WHERE ...".
Strangely, in some rare cases, the Wiki worked correctly for some people, but only in very rare cases.
Here is a screenshot of the problem: http://img513.imageshack.us/img513/3658/wikiupdate3qx1.jpg (original MediaWiki shows it without the self-added debug information at the top of the page).

I looked into the code and saw that the "includes/BagOStuff.php" uses a PHP4-style constructor on line 225. When I changed this to "__construct", the Wiki works correctly for me.
This is most-probably a PHP 5.0.4 problem, but as MediaWiki 1.10.0 should work with all PHP 5.x versions, this problem should be fixed in MediaWiki.

If you need any additional information, just ask.
Comment 1 Rob Church 2007-06-04 19:39:27 UTC
Please check this isn't due to a broken or outdated version of eAccelerator or Zend Optimizer, first.
Comment 2 Colin Finck 2007-06-04 21:33:30 UTC
Sorry, I'm not the administrator of this server, so I cannot test, what happens if I leave out a specific module.

The only thing I can add is that this change will be in the MediaWiki code anyway at some time if you plan to convert everything to PHP 5.x style.
I already saw these "__construct" functions in other files like Database.php, so it's not other coding style or something like that.

Therefore I think, you should change that function as it also fixes this bug in my case.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-06-04 22:26:49 UTC
No reason not to do this.  Changed in r22723.

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


Navigation
Links