Parsing of index file and PHP_SELF

Discussion in 'Bug Reports' started by chief, Oct 9, 2005.

  1. chief

    chief New Member

    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.
  2. mistwang

    mistwang LiteSpeed Staff

    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.

Share This Page