BASE_URL constant is strange in Apache2.4/Windows64

edited October 2015 in Bug Reports
I've been running Fuel fine on *unix based systems, although today I'm installing it on a windows server and I'm having trouble with the BASE_URL. Perhaps it's something to do with my Apache so please bare with me here.

I'm looking in fuel/modules/fuel/config/fuel_constants.php where BASE_URL is being defined. You can see that my SCRIPT_NAME is strangely being returned as my drive letter followed by the script which is what is causing the strange behaviour.

$_SERVER['HTTP_HOST'] // local.dev basename($_SERVER['SCRIPT_NAME']) // index.php $_SERVER['SCRIPT_NAME'] // C:/index.php str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']) // C:/ BASE_URL // http://local.devC:/

and so I am often forwarded to a URL like:

http://local.devC:/fuel/login/dev which breaks the urls.

I've also reported this to bugs.php.net since this may not be related to how you are detecting the BASE_URL / not related to FUEL.

Comments

  • edited 7:15PM
    So this was an issue with either PHP or Apache. They were behind by a few minor versions so I've just updated them and I'm not running into this issue anymore.

    thanks!
  • edited 7:15PM
    Good to know. Thanks.
Sign In or Register to comment.