Last modified: 2010-05-15 15:34:04 UTC
If I try to run any of the maintenance scripts (in my case rebuildall.php or rebuildtextindex.php) then I get a couple of errors as follows: C:\xampp\xampp\htdocs\MEDIAW~1.5\MAINTE~1>C:\xampp\xampp\php\php rebuildall.php Warning: Invalid argument supplied for foreach() in C:\xampp\xampp\htdocs\MEDIAW~1.5\MAINTE~1 \commandLine.inc on line 156 Fatal error: Call to a member function tableName() on a non-object in C:\xampp\xampp\htdocs\mediawiki-1.4.5\includes\ObjectCache.php on line 409 The first error in commandLine.inc is related to the newly added multiple DB server code. It gets cranky because foreach is expecting an array, but if you aren't using multiple DB servers, then it's just a single false value per DefaultSettings.php Adding a check using is_array seems to make this happier, as follows: if (is_array($wgDBservers)) { foreach ( $wgDBservers as $i => $server ) { $wgDBservers[$i]['user'] = $wgDBuser; $wgDBservers[$i]['password'] = $wgDBpassword; } } The second error, I haven't yet figured out why it is getting upset. This worked OK in V1.4.4 The rest of the MediaWiki software seems to be running OK (the apache / web part). It's just the maintenance scripts that seem to be giving troubles. Regards Jason
Sounds like a database connection failed in some way, returning a null object; can you confirm correct $wgDBadminuser and $wgDBadminpassword settings in AdminSettings.php?
Right on Brion ! I forgot to fix AdminSettings after I changed my MySQL password. Can these maintenance scripts fail more "gracefully" ? Even just a couple of printfs for the dummies like me to remind me to check AdminSettings.php is (a) present and (b) is correctly configured, would be good. After all, we may not touch some parts of the MediaWiki system in between upgrades. I only decided to reindex because I reconfigured MySQL to use a fulltext index word length of 3 instead of 4 to catch all the TLAs we're using on our wiki. As for the first bug - that's definitely a bug rather than a result of my brain fading ! Cheers Jason
Seems to work fine on current CVS HEAD with PHP 4.4.1, 5.0.5, and 5.1.1. The foreach() thing sounds like a problem with really old versions of PHP, which we no longer support. Resolving WORKSFORME.