Hi All,

I am encountering an error when attempting to install Drupal 6.9 on CentOS 5.1 using MySQL 5.0 and Apache 2.2. The server is a virtual machine running on Hyper-V. I create the database, set up the filesystem, and run install.php in my browser, but the installer only gets to the forth step, 'Install site', at which point it displays a progress bar indefinitely. Checking the database, I find that all the tables have been constructed, but the data has not been completely populated. There are no errors in the watchdog table, and nothing interesting in my apache logs.

I have installed Drupal successfully about 6 times, and have successfully ported three Drupal installations between servers, so I think the problem has something to do with my server configuration rather than my failure to follow the installation instructions.

I started out with a multi-site installation. I unpacked the Drupal tarball to my webserver root /var/www/html and installed two sites, which worked perfectly:

/var/www/html/sites/www.mycompany.com
/var/www/html/sites/template.mycompany.com

Later, I decided to install a site in the directory /var/www/html/sites/default, and experienced the behavior I described at the beginning.

In attempt to diagnose the problem. I archived the existing databases and files and started with a completely fresh Drupal installation. I have tried going through the installation process almost ten times, sometimes attempting to install the default site, and sometimes attempting to install template.mycompany.com. Each time I have dropped all existing drupal databases and restored the filesystem to its initial state. Of the ten times, the installation was successful only once, for template.mycompany.com; all the other times, I got the error described at the beginning.

It seems that some system configuration must have changed since my initial successful installation of the two sites, but the only change I know of was running windows update on the base OS.

Any ideas?

Best Regards,

Jonathan Turkanis

Comments

cog.rusty’s picture

Run a phpinfo(). Upload it in a php file in your Drupal installation directory, and run it by browsing to one of the sites which fails.

Check your php memory_limit (http://drupal.org/node/207036)

Check your session.cookie_path.
Is it just "/"?
Can you find any cookies created for the new site?

Is the settings.php file which you are using a fresh one? Is it possible that it has been edited somehow?
Does the default.settings.php still exist under sites/default? (It should have been copied, not renamed to settings.php)

Try a different browser. Any difference?

turkanis’s picture

Thanks for you reply.

Since I posted, I was able to install two sites successfully by running the installer in a browser on a remote machine. I was puzzled that this would yield a different result than on the local machine, and it occurred to me that some cookies might have interfered with the install on the local browser. I deleted the cookies (without examining them) and tried another install from the local machine, which failed.

After receiving your reply, I attempted yet another install from the local machine, to attempt to answer some of your questions, and this time, it worked! But I tried again with a new domain, and got a failure. Here are the answers to your questions:

- My memory limit is 8M
- I generated a new settings.php from default.settings.php each time; the only changes I made were to uncomment and edit the $base_url line, which didn't have any effect.
- The session cookie path is "/"
- Here is a copy of phpinfo viewed from the failed installation: http://www.coderage.com/drupal/phpinfo.html

Thanks again!

cog.rusty’s picture

Your memory limit is below the requirements of Drupal 6, which is 16M. See http://drupal.org/requirements.

You need to increase it following the link in my first reply. If you intend to install additional modules, go for 32M or more.

turkanis’s picture

Whoops! Sorry, that was a typo. My memory limit is 200M, as posted in my php.ini. A wish the problem were that easy ;)

We've been running a Drupal site on the same server since October, with the same PHP configuration. Last week we decided to start over from scratch.

cog.rusty’s picture

Oops. I stopped reading when I saw "8M".

I would suspect some cookie blocking by the browser or a firewall on the local machine, but you did manage to do a successful installation...

Is there anything different about the site which installed successfully?
Same Drupal code base?
Anything different about the domain name?
Is it possible that the default.settings.php file which you copied had been edited at some point by mistake, for example by setting a $cookie_domain?

turkanis’s picture

Yes, it is very puzzling that it the install succeeds sometimes.

I have downloaded the drupal codebase several times, each time deleting the old copy. I have never edited default.settings.php. I have been using 4 different domain names, but each one has succeeded sometimes and failed other times.

The most consistent trend is that running install.php from a browser on a remote machine always seems to work. Is there any way I can enable logging of the installation process?

cog.rusty’s picture

There are Apache logs of course, and also you could get separate PHP logs by setting:

log_errors = On
error_log = /home/[blah]/error.log   // something writable by apache

in php.ini

elfsternberg’s picture

Firebug reports this when attempting an install:

Access to restricted URI denied" code: "1012
[Break on this error] eval(function(p,a,c,k,e,r){e=function(c)...r|serialize|pixelLeft'.split('|'),0,{}))
jquery.js?0 (line 13)

Which tells me that it might have worked fine, but there's something funny with the Javascript that Firefox 3.0.8 (Linux/32 bit) (maybe with some plugins? I don't have anything other than Flashblock and Firebug on mine) doesn't like.

For the record, I get the same phenomenon with Safari, but with less diagnostic.

elfsternberg’s picture

Jonathan, I've tracked down one cause. Let me guess: you're developing on the same box you're browsing from. You're using Apache. And it hangs at stage three.

Do this: stop and then start apache. If you see this message: "Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName," that's your problem. You're referring to your installation by name, but Apache is returning a canonical URI for yoru drupal resource by IP address, and the Javascript that's supposed to take you to the next stage is throwing a security error, at which point the installation hangs. Javascript doesn't know that your hostname and "127.0.0.1" are the same machine, so it's sandboxed them apart to prevent a cross-site security exploit, and when it tries to generate a URL for Javascript that goes to the other address, it barfs.

Drupal ought not be vulnerable to this kind of bug, but it is. In the meantime, use only the localhost url, "http://127.0.0.1/", for your address, and it ought to make it through install. After that, you can use whatever synonyms your want; this seems to be a problem only for the installation routine.

mox386’s picture

I have this problem also, I have a server somehow I got past this problem on 2 of the 5 sites I want to host on this thing. I'm now stuck on installing the last 3 sites and nothing is working. The server is dedicated to these 5 sites and is on the local network, so I cannot access it as local because I am on the same network (not the same machine). Yes I do want the outside world to be able to access all of these sites, but for now only 2 are operational. I cannot use "http://127.0.0.1/" to access ANY sites as the dedicated web-server box does not have a browser.

gonglei007’s picture

I met the same problem on my machine. I fix it by adding the site address http://127.0.0.1 and http://glserver(my site name) to Internet Setting => Safe => Local Intranet. I works. Hope it helps for others also.

aluran’s picture

I am having the same problem with setting up a multi-site install on local wamp. I followed the directions almost exactly (with minor modification for variances in my paths) from http://drupal.org/node/288126 (setting up a site1 and a site2). One of the sites installed and is working, the other got hung up at the fourth step of the install. I checked the database for the non-working site and everything did actually install, but I can't go on to the 'configure site' step. I tried all potential fixes in this string (including the suggestion to add the site names to trusted sites), but nothing has worked for me. Any new ideas?

When I attempt to go to the non-working site in safari or firefox I get the following error:

Fatal error: Call to undefined function user_access() in C:\wamp\www\includes\theme.inc on line 1776

gstokes’s picture

I had the very same problem trying to add a second site to multi sites install and as another poster suggested add your site to local intranet under security for IE and also add 127.0.0.1 and problem is solved, simple solution but quite annoying if you dont know the answer.

abiralo’s picture

Hello,

Thanks for your nice solution. But not improve the step. I use http://127.0.0.1 instead of localhost on drupal installation step.
Could you tell me its need to http://127.0.0.1 on wamp installation?

Please let me know details.
abiralo@gmail.com

Thanks in advanced

akash

petu’s picture

I had the same problem.

First of all I downgraded PHP from 5.3 to 5.2 (I use Ubuntu 10.04. It has php 5.3). Drupal 6.19 still incompatible with PHP 5.3.

Second step - I added code ini_set("display_errors", 0); at the beginning of settings.php for second site of my multisiting. It means turn off displaying all PHP-errors.

Run install.php - installation completed successfully!

scmadi’s picture

I´ve tried all the suggestions above, and nothing here.

Stucked on the "Install site section".....

The difference is that i´m not using it local, its on a rented hosting space.

Could it be that the php param (for memory_limit) are restricted?
I used the php_info() on a .php file, and it tells me that the memory_limit is 200M on this server.

I´m also using PHP 5.2.14...

And nothing here...
... and in this particular case I won´t be able to use Drupal on this project unless I can´t make it work.

Looking forward for some help,

msg’s picture

I had the same problem installing it local. More webpackets have it, like Magento.

What I did?

In my hostfile (C:\windows\system32\drivers\etc\hosts open it with notepad)

I made this entry:

#Drupalfix
127.0.0.1 localhost.com

now use localhost.com as the host when installing and it will work again.

shimmertron’s picture

I struggled with the "stuck on install site" all day - I then dropped the database - created a new database and named it the same as the old database(so I didn't have to mess with the settings.php) and refreshed the page - boom - fixed. I had originally installed the site before the domain name was active and wonder if that created a problem. Worked for me.

southcot’s picture

shimmertron just the ticket that resolved it for me. Thanks for posting it.

patcon’s picture

Bah! It's a webkit/chrome issue. Just go through the install process with firefox and you're good to go :)

mittalpatel’s picture

3 times tested in chrome, it didn't work. Used firefox and I am done. :-)

drakulil’s picture

Hi I had the same problem,

When i checked my drupal site, the default jquery files on misc dir is jQuery 1.7.2. One of my team member replace it with the newer version.

I replace it with the default drupal jQuery 1.2.6 and it worked fine.