Mailing List Archive

error during installation
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,
Re: error during installation [ In reply to ]
> (Krzysztof Kowalczyk <krzysztofk@pobox.com>):
> 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":

Thanks for the report--yes, that's a bug. The original encryptPassword()
function was static, but the recent change to add a salt to the
encryption used a non-static function. I'm not sure why the install
script has been working for me, but at any rate I'll fix it right away.

--
Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC
Re: error during installation [ In reply to ]
Lee Daniel Crocker wrote:
> Thanks for the report--yes, that's a bug. The original encryptPassword()
> function was static, but the recent change to add a salt to the
> encryption used a non-static function. I'm not sure why the install
> script has been working for me, but at any rate I'll fix it right away.

I tried to install too (trying to get checktrans running).

Following problems occoured:

$wgLanguageCode = "de" (example) in Localsettings php is unhappy.

After testing the existens of LocalSettings and AdminSettings in
install.php, it would help to include them. The next test ($wgUseTex) won't
work without loading them.

If another language is defined, install should copy the appropriate
language files.

That's just as far as I got, it's of course still not working ;)

Smurf
--
------------------------- Anthill inside! ---------------------------
Re: error during installation [ In reply to ]
> (Thomas Corell <T.Corell@t-online.de>):
>
> Following problems occoured:
> $wgLanguageCode = "de" (example) in Localsettings php is unhappy.

You'll have to tell me what this means in plain English before I
can help you. Yes, you'll have to add that line to LocalSettings.php,
with the semicolon, to get a German wiki. This LocalSettings.php file
must be in the top level directory of the phase3 tree (along with a
localized AdminSettings.php as well) when you run the install script,
and you must run it from that directory.

LocalSettings.php must also be updated with the paths in which you
want the software installed, and you must have permission to write
there (or run the install script as root).

> After testing the existence of LocalSettings and AdminSettings in
> install.php, it would help to include them. The next test ($wgUseTex)
> won't work without loading them.

Yep, that's a bug. I moved the second test from after the include
to before it without thinking. My mistake--fixed now in CVS.

> If another language is defined, install should copy the appropriate
> language files.

It does (or should--line 60 of the script). Again, make sure you
have all the environment for the install set up.

--
Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC
Re: error during installation [ In reply to ]
Lee Daniel Crocker wrote:
>>(Thomas Corell <T.Corell@t-online.de>):
>>
>>Following problems occoured:
>>$wgLanguageCode = "de" (example) in Localsettings php is unhappy.
> You'll have to tell me what this means in plain English before I
> can help you. Yes, you'll have to add that line to LocalSettings.php,
> with the semicolon, to get a German wiki. This LocalSettings.php file
> must be in the top level directory of the phase3 tree (along with a
> localized AdminSettings.php as well) when you run the install script,
> and you must run it from that directory.

Sorry, this was written too fast, and with too few brain activated. I
should have written it this way:

It would be nice if in the LocalSettings.sample a line like:

# If you use a language different from english (en) uncomment the
# following line and edit the Language Code appropriate:
# $wgLanguageCode ="En";

could be added, for an easy installation of non english wikis.

PS: I will think about to change to german language for my mails here, to
avoid problems(for me), as proposed by Tomasz Wegrzanowski.

Smurf
--
------------------------- Anthill inside! ---------------------------
Re: error during installation [ In reply to ]
> (Thomas Corell <T.Corell@t-online.de>):
>
> It would be nice if in the LocalSettings.sample a line like:
>
> # If you use a language different from english (en) uncomment the
> # following line and edit the Language Code appropriate:
> # $wgLanguageCode ="En";

OK.

> PS: I will think about to change to german language for my mails here, to
> avoid problems(for me), as proposed by Tomasz Wegrzanowski.

Certainly one is welcome to post here in any language, but you'll
limit the number of people who are capable of responding. I, for
example, can't read or answer anything written in languages other
than English, Spanish, or Lojban (and if you actually want to write
bug reports in Lojban, you have way too much time on your hands).

--
Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC
Re: error during installation [ In reply to ]
it worked for me too, after the bug fix.
got the same problem as Krzysztof for the styles, but overall, that works.
Thanks!

Nicolas


----- Original Message -----
From: "Lee Daniel Crocker" <lee@piclab.com>
To: <wikitech-l@wikipedia.org>
Sent: Monday, April 28, 2003 10:10 AM
Subject: Re: [Wikitech-l] error during installation


> > (Krzysztof Kowalczyk <krzysztofk@pobox.com>):
> > 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":
>
> Thanks for the report--yes, that's a bug. The original encryptPassword()
> function was static, but the recent change to add a salt to the
> encryption used a non-static function. I'm not sure why the install
> script has been working for me, but at any rate I'll fix it right away.
>
> --
> Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
> "All inventions or works of authorship original to me, herein and past,
> are placed irrevocably in the public domain, and may be used or modified
> for any purpose, without permission, attribution, or notification."--LDC
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l@wikipedia.org
> http://www.wikipedia.org/mailman/listinfo/wikitech-l
>