Parsing of index file and PHP_SELF

chief

New Member
#1
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
Code:
dirname($_SERVER['PHP_SELF'])
return a 404.

Thanks and best wishes.
 

mistwang

LiteSpeed Staff
#2
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.
 
Top