Last modified: 2010-05-15 15:51:58 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 T12140, the corresponding Phabricator task for complete and up-to-date bug report information.
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