PDA

View Full Version : Problem with $base_url


Bellvis
02-18-2006, 03:39 AM
Tonight, I had some wierd issues with Drupal redirecting to my site's /cgi-bin directory after saving configuration data. Turns out that vbDrupal's settings.php is setting the base URL based upon the environment variable SCRIPT_NAME, which in my case was "/cgi-bin/php". On my home Linux box this was OK.

But in the shared hosting production environment, I need to use PATH_INFO instead to ensure the browser retrieves an actual script.

tamarian
02-18-2006, 10:51 PM
Tonight, I had some wierd issues with Drupal redirecting to my site's /cgi-bin directory after saving configuration data. Turns out that vbDrupal's settings.php is setting the base URL based upon the environment variable SCRIPT_NAME, which in my case was "/cgi-bin/php". On my home Linux box this was OK.

But in the shared hosting production environment, I need to use PATH_INFO instead to ensure the browser retrieves an actual script.

Try this, edit settings.php and add this line after the existing baseurl stuff

$base_url = $vboptions['drupalurl'];

Bellvis
02-20-2006, 10:16 PM
That worked and is probably more sensical than grabbing yet another environment variable as I did. Thanks.