PDA

View Full Version : Parsing of index file and PHP_SELF


chief
10-08-2005, 05:05 PM
Hello,

I'm using the latest standard install of LS 2.1.2 std with PHP LSapi on a debian machine.

When the index file is not typed in the URL, PHP_SELF does not include the index filename and the dirname function returns a path one folder up. I've set up examples.

1) Under apache, http://www.nadzri.net/home/
2) Under LS, http://ja.nadzri.net/home/
3) Under LS, with index file appended, http://ja.nadzri.net/home/index.php

(3) = (1) but if index file is not in URL, the result is different.

(2) please note the missing "home" directory in the resultant URL, making a redirect using dirname($_SERVER['PHP_SELF']) return a 404.

Thanks and best wishes.

mistwang
10-09-2005, 05:30 PM
Thank you for the bug report.

That's because the PHP_SELF is set to '/home/' instead of '/home/index.php' in the second test case. We will change it in next minor release to make LSWS behave like an Apache as much as possible.