In my installation, $_SERVER['SCRIPT_NAME'] has the value '/fcgi-bin/php.fcgi' (don't ask me why, is not my server).

This causes install.php to set $base_url to http://www.arremolina.com/fcgi-bin, which is wrong and then the script fails trying to find the page http://www.arremolina.com/fcgi-bin/install.php?profile=default

I have changed SCRIPT_NAME into PATH_INFO in includes/bootstrap.inc as a temporary solution, but I don't know if this is correct.

CommentFileSizeAuthor
#6 php_self.patch586 byteschx
#1 htaccess2.93 KBjessegri
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jessegri’s picture

FileSize
2.93 KB

I'm not sure if this is the same issue or not but I tried to install Drupal 5 beta 1 to a server running mod_fastcgi and got similar malformed URL results. I was in a hurry to kick the tires on the new version so I just modified the stock .htaccess file and appended the following line into it.

RemoveHandler cgi-script .php

This did the trick and the installer completed with limited issues, all my fault. Granted I'm not running php code as a cgi script in this directory but that was a small loss to me on a test installation with no work load to speak of. I'll dig into the install code and see if I can figure out a fix, but not until I've finished playing with all the new shiny features of 5, so don't hold your breath or wait on me.

jessegri’s picture

On a hunch I commented out the remove handler line I added to the .htaccess file and I was rewarded with blazing fast performance, I'm very impressed with the results I must say. So it looks like this is just a bug in the new install script not being able to detect the base URL when run as a cgi. Not a surprising bug at all, at least to me anyway.

mikey_p’s picture

I have a similar problem when installing from from a subdirectory on my host (dreamhost). Upon trying to open site.com/directory/install.php it would redirect to site.com/cgi-bin/install.php which doesn't exist. Moving out of a subdirectory made the install work as expected.

See: http://drupal.org/drupal-5.0-beta1#comment-169923 for more examples.

moshe weitzman’s picture

Priority: Normal » Critical

i know that on groups.drupal.org, we manually set a $base_url in our settings.php and all works well (didn't try installer though). there might be a more systematic fix though.

tentatively setting to critical because folks can't even install with fastcgi.

chx’s picture

plz attach (or send me in private if sensitive) var_dump($_SERVER) from a fastcgi server and tell me what $base_url should be so I can figure out some combination that works.

chx’s picture

Status: Active » Needs review
FileSize
586 bytes

thanks Moshe, Kjartan, Greggles for providing dumps.

greggles’s picture

I tested this with the following steps:

1. check out drupal head as of right now...
2. get and apply the patch
3. visit http://example.com/subdir/
4. My browser was redirected to http://example.com/subdir/install.php?profile=default

My server is PHP5.1.2cgi-fcgi

I believe this is the correct behavior - if another user with phpmodule can test then it seems RTBC.

greggles’s picture

I just removed the patch and tested again and I was forwarded to install.php?profile=default

So, I can't repeat the original problem which means that my test may not be relevant. At least this change doesn't cause a regression for me.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Worked for me as a module.

Dries’s picture

Version: 5.0-beta1 » 4.7.x-dev

Committed to CVS HEAD. I think this needs backporting.

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

done

Anonymous’s picture

Status: Fixed » Closed (fixed)