Mailing List Archive

Installation of 1.3.2 to 1&1 webserver fails
Hi,

I copied all the Media Wiki 1.3.2 files into my 1&1 (www.1and1.com)
webspace, set up 1&1 to create a database, chmod 777 the config directory
and ran the install web page...sadly, it hung after I submitted all my
details (database name, etc).

Has anyone else run into this problem? What's the solution?

Here's all that was on my webpage after submitting the database info:

MediaWiki 1.3.2 installation
Please include all of the lines below when reporting installation problems.

Checking environment...
PHP 4.3.8: ok
Warning: PHP's register_globals option is enabled. MediaWiki will work
correctly, but this setting increases your exposure to potential security
vulnerabilities in PHP-based software running on your server. You should
disable it if you are able.
PHP server API is cgi; using ugly URLs (index.php?title=Page_Title)
Have XML / Latin1-UTF-8 conversion support.
PHP's memory_limit is 40M. If this is too low, installation may fail!
Have zlib support; enabling output compression.
Found GD graphics library built-in, image thumbnailing will be enabled if
you enable uploads.
Installation directory: /homepages/27/d88423054/htdocs/wiki
Script URI path: /wiki
Re: Installation of 1.3.2 to 1&1 webserver fails [ In reply to ]
Andrew Reeves-Hall wrote:
> I copied all the Media Wiki 1.3.2 files into my 1&1 (www.1and1.com)
> webspace, set up 1&1 to create a database, chmod 777 the config directory
> and ran the install web page...sadly, it hung after I submitted all my
> details (database name, etc).
>
> Has anyone else run into this problem? What's the solution?

These things can be hard to diagnose because error messages may
disappear into PHP's buffering or just never get shown.

The ugly answer I'm afraid is to try digging in and look for the error;
the most reliable (though annoying) way is to add a die("Got here");
statement into the script, which forces the script to end, print a
message, and flush all output to the browser. Keep moving the die()
farther and farther until you stop seeing its output, and you'll have a
better idea where the problem is.

It also help *A LOT* if you can get PHP's error logging turned on, as
you might get more detailed error messages directly. Check with your
hosting provider's support staff to see if they can do this for you
and/or try adding the following near the top of config/index.php (after
the <?php bit):

ini_set('log_errors', true);
ini_set('error_log', '/filesystem/path/to/your/webspace/errors.log');

I'm not 100% sure this would work within the script, but try it.

-- brion vibber (brion @ pobox.com)
Re: Installation of 1.3.2 to 1&1 webserver fails [ In reply to ]
On Tue, 07 Sep 2004 14:46:39 -0700, Brion Vibber <brion@pobox.com> wrote:
> It also help *A LOT* if you can get PHP's error logging turned on, as
> you might get more detailed error messages directly. Check with your
> hosting provider's support staff to see if they can do this for you
> and/or try adding the following near the top of config/index.php (after
> the <?php bit):

I have been struggling with the same problem for a few weeks now. I
finally managed to get logs from my provider, and here is the result:

[Tue Sep 7 10:00:26 2004] [error] PHP Warning:
Unknown(DefaultSettings.php): failed to open stream: No such file or
directory in /mn/sarpanitu/ansatte-u20/johans/www_docs/wiki/config/index.php(374)
: eval()'d code on line 8
[Tue Sep 7 10:00:26 2004] [error] PHP Warning: (null)(): Failed
opening 'DefaultSettings.php' for inclusion
(include_path='.::/includes:/languages') in
/mn/sarpanitu/ansatte-u20/johans/www_docs/wiki/config/index.php(374) :
eval()'d code on line 8

I have tried to play around with the paths to the include dir, but it
still only hangs.

Initial output from the config script is here:

Please include all of the lines below when reporting installation problems.
Checking environment...

* PHP 4.3.8: ok
* Warning: PHP's register_globals option is enabled. MediaWiki
will work correctly, but this setting increases your exposure to
potential security vulnerabilities in PHP-based software running on
your server. You should disable it if you are able.
* PHP server API is apache; ok, using pretty URLs (index.php/Page_Title)
* Have XML / Latin1-UTF-8 conversion support.
* PHP's memory_limit is 8M. If this is too low, installation may
fail! Attempting to raise limit to 20M... ok.
* Have zlib support; enabling output compression.
* Couldn't find GD library or ImageMagick; image thumbnailing disabled.
* Installation directory:
* Script URI path: /johans/wiki

What I have notived is that there is no "Installation directory",
could this be the source of the problem?

--
Regards
Johan Seland
Re: Installation of 1.3.2 to 1&1 webserver fails [ In reply to ]
Johan Seland wrote:
> [Tue Sep 7 10:00:26 2004] [error] PHP Warning:
> Unknown(DefaultSettings.php): failed to open stream: No such file or
> directory in /mn/sarpanitu/ansatte-u20/johans/www_docs/wiki/config/index.php(374)
> : eval()'d code on line 8
> [Tue Sep 7 10:00:26 2004] [error] PHP Warning: (null)(): Failed
> opening 'DefaultSettings.php' for inclusion
> (include_path='.::/includes:/languages') in
> /mn/sarpanitu/ansatte-u20/johans/www_docs/wiki/config/index.php(374) :
> eval()'d code on line 8
[snip]
> What I have notived is that there is no "Installation directory",
> could this be the source of the problem?

Yeah, that's pretty suspicious...

The install base directory is obtained with the getcwd() function. From
its documentation:

Note: On some Unix variants, getcwd() will return FALSE if any one
of the parent directories does not have the readable or search mode
set, even if the current directory does. See chmod() for more
information on modes and permissions.

This may perhaps be biting you. Try taking this bit of code in
config/index.php:

chdir( ".." );
$conf->IP = getcwd();
$conf->IP = preg_replace( "/\\\\/","\\\\\\\\",$conf->IP ); // For
Windows, \ -> \\
chdir( "config" );

and replace it with this:

$conf->IP = dirname( dirname( __FILE__ ) );

Hopefully the latter should be more reliable.

-- brion vibber (brion @ pobox.com)
Re: Installation of 1.3.2 to 1&1 webserver fails [ In reply to ]
Hi,

I changed the index.php file to use this instead:
$conf->IP = dirname( dirname( __FILE__ ) );
and I found a function in the 1&1 FAQ
(http://faq.1and1.com/scripting_languages_supported/php/8.html) that stores
PHP error messages from the 1&1 server.

Here are the error messages:

08/09/2004 18:29
"/homepages/27/d8842wxyz/htdocs/wiki/includes/DefaultSettings.php:
21" (Notice) Undefined variable: wgCommandLineMode
08/09/2004 18:30
"/homepages/27/d8842wxyz/htdocs/wiki/includes/DefaultSettings.php:
21" (Notice) Undefined variable: wgCommandLineMode
08/09/2004 18:30 "/homepages/27/d8842wxyz/htdocs/wiki/config/index.php:
807" (Notice) Undefined property: DBmysql4
08/09/2004 18:30 "/homepages/27/d8842wxyz/htdocs/wiki/includes/Database.php:
106" (Warning) mysql_connect(): Access denied for user:
'root@217.160.226.22' (Using password: NO)
08/09/2004 18:30 "/homepages/27/d8842wxyz/htdocs/wiki/config/index.php:
420" (Warning) mysql_get_server_info(): supplied argument is not a
valid MySQL-Link resource

Does this give any more clues as to what's going wrong?
What is that about 'root' - I didn't fill that in on the form (I supplied
the database login).
Re: Re: Installation of 1.3.2 to 1&1 webserver fails [ In reply to ]
Andrew Reeves-Hall wrote:
> Here are the error messages:
>
> 08/09/2004 18:29
> "/homepages/27/d8842wxyz/htdocs/wiki/includes/DefaultSettings.php:
> 21" (Notice) Undefined variable: wgCommandLineMode
> 08/09/2004 18:30
> "/homepages/27/d8842wxyz/htdocs/wiki/includes/DefaultSettings.php:
> 21" (Notice) Undefined variable: wgCommandLineMode
> 08/09/2004 18:30 "/homepages/27/d8842wxyz/htdocs/wiki/config/index.php:
> 807" (Notice) Undefined property: DBmysql4
> 08/09/2004 18:30 "/homepages/27/d8842wxyz/htdocs/wiki/includes/Database.php:
> 106" (Warning) mysql_connect(): Access denied for user:
> 'root@217.160.226.22' (Using password: NO)
> 08/09/2004 18:30 "/homepages/27/d8842wxyz/htdocs/wiki/config/index.php:
> 420" (Warning) mysql_get_server_info(): supplied argument is not a
> valid MySQL-Link resource
>
> Does this give any more clues as to what's going wrong?
> What is that about 'root' - I didn't fill that in on the form (I supplied
> the database login).

Those should all be harmless; your handler seems to be recording
suppressed messages. It tries root with no password so it can create the
database and user account if necessary; if it can't do that it'll try to
work with the specified account.

Can you clarify exactly what happens? What does "hung" mean? Does it
continue running for a long time? How long? Does the web browser time
out? After how long?

-- brion vibber (brion @ pobox.com)
Re: Installation of 1.3.2 to 1&1 webserver fails [ In reply to ]
On Wed, 08 Sep 2004 12:37:10 -0700, Brion Vibber <brion@pobox.com> wrote:
> > What I have notived is that there is no "Installation directory",
> > could this be the source of the problem?
>
> Yeah, that's pretty suspicious...
> [snip]
> This may perhaps be biting you. Try taking this bit of code in
> config/index.php:

This helps for setting a proper installation directory. Output is now:

Checking environment...

* PHP 4.3.8: ok
* Warning: PHP's register_globals option is enabled. MediaWiki
will work correctly, but this setting increases your exposure to
potential security vulnerabilities in PHP-based software running on
your server. You should disable it if you are able.
* PHP server API is apache; ok, using pretty URLs (index.php/Page_Title)
* Have XML / Latin1-UTF-8 conversion support.
* PHP's memory_limit is 8M. If this is too low, installation may
fail! Attempting to raise limit to 20M... ok.
* Have zlib support; enabling output compression.
* Couldn't find GD library or ImageMagick; image thumbnailing disabled.
* Installation directory: /mn/sarpanitu/ansatte-u20/johans/www_docs/wiki
* Script URI path: /johans/wiki

But once I submit all the information and press install, all I get is
a blank page as before.
As you might remember, the logfiles report that
includes/DefaultSettings.php could not be found. I have asserted that
this directory is readable, and even removed the default .htaces s
(with Deny from all) that was included in mediawiki/includes.

Could it be the same problem as above with GetCwd returning false somewhere?
--
Regards
Johan Seland
Re: Installation of 1.3.2 to 1&1 webserver fails [ In reply to ]
I can also report I am having the excact same behavior on Mediawiki-1.3.3

On Thu, 9 Sep 2004 09:34:10 +0200, Johan Seland <johan.seland@gmail.com> wrote:
> On Wed, 08 Sep 2004 12:37:10 -0700, Brion Vibber <brion@pobox.com> wrote:
> > > What I have notived is that there is no "Installation directory",
> > > could this be the source of the problem?
> >
> > Yeah, that's pretty suspicious...
> > [snip]
> > This may perhaps be biting you. Try taking this bit of code in
> > config/index.php:
>
> This helps for setting a proper installation directory. Output is now:
>
> Checking environment...
>
> * PHP 4.3.8: ok
> * Warning: PHP's register_globals option is enabled. MediaWiki
> will work correctly, but this setting increases your exposure to
> potential security vulnerabilities in PHP-based software running on
> your server. You should disable it if you are able.
> * PHP server API is apache; ok, using pretty URLs (index.php/Page_Title)
> * Have XML / Latin1-UTF-8 conversion support.
> * PHP's memory_limit is 8M. If this is too low, installation may
> fail! Attempting to raise limit to 20M... ok.
> * Have zlib support; enabling output compression.
> * Couldn't find GD library or ImageMagick; image thumbnailing disabled.
> * Installation directory: /mn/sarpanitu/ansatte-u20/johans/www_docs/wiki
> * Script URI path: /johans/wiki
>
> But once I submit all the information and press install, all I get is
> a blank page as before.
> As you might remember, the logfiles report that
> includes/DefaultSettings.php could not be found. I have asserted that
> this directory is readable, and even removed the default .htaces s
> (with Deny from all) that was included in mediawiki/includes.
>
> Could it be the same problem as above with GetCwd returning false somewhere?
> --
> Regards
> Johan Seland
>



--
Regards
Johan Seland
Re: Installation of 1.3.2 to 1&1 webserver fails [ In reply to ]
Just to let you know that the new MediaWiki 1.3.3 version works on my 1&1
site (whew!)

Thanks to everyone for all their help...

~Andrew~
Re: Re: Installation of 1.3.2 to 1&1 webserver fails [ In reply to ]
Andrew Reeves-Hall wrote:
> Just to let you know that the new MediaWiki 1.3.3 version works on my 1&1
> site (whew!)
>
> Thanks to everyone for all their help...

Great! I'm glad it works for somebody... :)

-- brion vibber (brion @ pobox.com)