PHP $DOCUMENT_ROOT variable missing?

Discussion in 'Bug Reports' started by SyNeo, Dec 7, 2004.

  1. SyNeo

    SyNeo New Member

    Hello.

    I'm trying to migrate a web-site to the lsws. It uses the $DOCUMENT_ROOT extensivly, in order to include other php's. As it seems, this variable is missing in the bundled PHP installation.

    How can I attach then the lsws to the general PHP, and how it will be used (module, fastcgi/cgi)? I seemed something regarding it during the installation process, can't recall now what it was.

    I'm using the latest, LiteSpeed Web Server V1.5.11 Standard Edition.

    Thank you.
  2. mistwang

    mistwang LiteSpeed Staff

    Hi,

    Looks like your PHP script depends on "register_globals", you can either use $_SERVER["DOCUMENT_ROOT"] or turn on "register_globals" by changing the lsws/conf/php.ini .

    "register_globals" is not recommended by PHP team, so it is turned of by default.

    Best Regards,
    George Wang
  3. SyNeo

    SyNeo New Member

    Hello.

    Thank you for the reply. I totally forgot regarding this issue. The interesting thing is, that I do have a "php_flag register_globals on" defined in this site's .htaccess file. Does lsws supports loading custom PHP overides from the .htaccess?

    I have set in the lsws virtual host, "allow overide all". It seems as not including this value.
  4. mistwang

    mistwang LiteSpeed Staff

    I see.
    PHP's FastCGI SAPI does not allow runtime configuration override, so lsws can not support that now. PHP related directives in .htaccess are ignored. It will change when we implement our own SAPI interface. :)
  5. SyNeo

    SyNeo New Member

    Ok - thank you for the explanation.

Share This Page