Apologies if this is something obvious.
I tried to install the latest CVS phase3 code on RH Linux 7.2, MySQL
3.23.54, PHP 4.3.1. I got the following error when running "php
install.php":
Enter the root password here: ***
Creating database...
Fatal error: Call to a member function on a non-object in
/var/www/kovi/www/wiki/User.php on line 287
/var/www/kovi/www/wiki/User.php(287) : Fatal error - Call to a member
function on a non-object
My guess is that it comes from populatedata() in install.php which calls:
$sql = "INSERT INTO user (user_name, user_password, user_rights)"
.
"VALUES ('WikiSysop','" . User::encryptPassword(
$wgDBadminpassword ) .
"','sysop'),('WikiDeveloper','" . User::encryptPassword(
$wgDBadminpassword ) . "','sysop,developer')";
wfQuery( $sql, $fname );
User::encryptPassword() is:
function encryptPassword( $p )
{
return $this->addSalt( md5( $p ) );
}
and User::addSalt() is:
function addSalt( $p )
{
return md5( "wikipedia{$this->mId}-{$p}" );
}
Now, I know next to nothing about PHP but what the error seems to be
saying that encryptPassword is being called as a static function (in C++
meaning) while it isn't because it calls addSalt() which isn't static
because tries to access object data so it needs an instance of the class
to operate on.
Is this a known problem or am I doing something wrong?
Thanks,