Installing 4.7 on lycos.co.uk web hosting

The problem

A friend of mine is converting her site from Joomla to Drupal, but was struggling to get it running. After installing she got nothing but an error message to say connection to the database couldn't be made. We've got it working now so I thought I would share our learning in case it helps anyone else.

With the default .htaccess file we also got nothing but Error 500 messages.

The quick summary is that you need to add ___db_host and ___db_user to the list of allowed globals in bootstrap.inc. You need to comment out the two options lines in the .htaccess file.

Details - Database Connection

The error she got after installation (and without the .htaccess enabled) was:

Unable to connect to database server
This either means that the username and password information in your settings.php file is incorrect or we can't contact the MySQL database server. This could mean your hosting provider's database server is down.

The MySQL error was: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).

Currently, the username is {user_name} and the database server is localhost.

Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

This had me stumped for ages as a short php test script that did nothing but connect to the database and list the tables worked fine.

It got me thinking that Drupal must be changing something, and discovered that Druapl unsets a lot of globals during the bootstrap phase.

A little bit of diagnostic code and I discovered that the Lycos system sets two globals that relate to database use. When Drupal unsets them the database connectivity stops.

The two globals are:

  • ___db_user (that's three underscores at the start)
  • ___db_host (three underscores again)

The ___db_user string contains the same data as the "actual" user name the account settings said to use, but the ___db_host string contains a completely different path and port to the one that the Lycos account settings said!

The fix was to add the two variables to the list of allowed globals, at line 139 of bootstrap.inc. The connection values in settings.php were left as those that the Lycos account information provided.

There were some other globals that seem to relate to Lycos too - I wasn't sure what they were doing so to avoid any further problems I added them to the list too.

So, the list of allowed globals for running on lycos.co.uk hosting is:

<?php
$allowed
= array(
 
'_ENV' => 1,
 
'_GET' => 1,
 
'_POST' => 1,
 
'_COOKIE' => 1,
 
'_FILES' => 1,
 
'_SERVER' => 1,
 
'_REQUEST' => 1,
 
'access_check' => 1,
 
'___db_user' => 1,
 
'___db_host' => 1,
 
'webc_real_domain_tab' => 1,
 
'webc_real_path' => 1,
 
'webc_real_domain' => 1,
);
?>

Details - .htaccess

We moved on to trying to get clean urls enabled. Through nothing more than trial and error it seems the lycos servers object to both of:

Options -Indexes
Options +FollowSymLinks

By commenting out those lines everything the file is ok and the error disappeared. I'm not really used to working with .htaccess so I'm not sure what those settings will mean for the operation of the site, but given the site won't work if they are set then we have no choice :-)

The last problem was that for some reason although the clean url test was working, the option to enable clean urls from the admin interface stayed greyed out after the test was done. We've had to force it by adding 'clean_url' => 1 to the $conf array in settings.php. In this case I'm not sure if that's a lycos bug, or a drupal bug.

Summary

The site is up and running, with clean urls - all that has to be done now is port the content from Joomla to Drupal... But that's not my job :-)

Very helpful, but not all is solved here

jos_s - September 28, 2006 - 14:03

These were exactly the tips I was looking for! This solved most of the problems I had with a Dutch Lycos account. What didn't work with me was the clean URL solution. I got 500 erros after implementing that.

I suspect that the 'webc_real_domain_tab' => 1, 'webc_real_path' => 1, 'webc_real_domain' => 1, are probably necessary because database and webserver are maybe not on the same server. That might be why I couldn't manage to upload a logo image that would then be visible on the site. Any tips on this problem, anyone?

Jos

Quixote/Classical Composers Database

More clues: .htaccess in /files gives problem

jos_s - September 28, 2006 - 16:10

I now found out that the uploaded logo can be seen when I remove the .htaccess file in the /files directory (which is not a good idea, I know). I do not yet have a clue as to what causes this behaviour, and most importantly, what can be done about this.

Quixote/Classical Composers Database

Drupal 6.4 work also with these settings

sofist - September 14, 2008 - 18:25

Firts I installed drupal 6.4 on wamp server. I export the local database and import this into a the database on lycos (with the control panel). I copied the local drupal site to my website (with ftp).
And finnaly I added the suggestion you made.

I installed drupal first on a local wamp server, because the input fields for my database connection where to small. After I uploded the site I had to rewite the settings.php of course.

Everything works. So Thank you.

De Sofist.

 
 

Drupal is a registered trademark of Dries Buytaert.