PHP $DOCUMENT_ROOT variable missing?

SyNeo

Well-Known Member
#1
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.
 

mistwang

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

SyNeo

Well-Known Member
#3
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.
 

mistwang

LiteSpeed Staff
#4
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. :)
 
Top