LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Install/Configuration (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=11)
-   -   FastCGI : SCRIPT_FILENAME vs. PATH_TRANSLATED (http://www.litespeedtech.com/support/forum/showthread.php?t=36)

bogus 03-21-2004 09:32 AM

FastCGI : SCRIPT_FILENAME vs. PATH_TRANSLATED
 
Sorry if I post in the wrong forum...

It looks like LSWS does not provide the same environment variables to the FastCGI process when it is considered as a script handler or when it is considered as a context handler.

In particular : SCRIPT_FILENAME seems to be available only to script handlers whereas PATH_TRANSLATED seems to be available only to context handlers... In both case the FastCGI is a RESPONDER.

So I'm a bit confused here, because I'm trying to make php work as a context handler (to have a remote PHP process without duplicating the doc_tree in both places). But PHP seems to rely on SCRIPT_FILENAME only. So it does not work.

Is LSWS behavior the standard, or is PHP wrong ? Or I'm missing something (as usual :cry: )

Thank you.

bogus 03-21-2004 10:15 AM

Well, I've found part of the answer myself (PHP side) : configuring PHP with --disable-discard-path let PHP use PATH_TRANSLATED when SCRIPT_FILENAME is not available.

mistwang 03-21-2004 11:06 AM

Re: FastCGI : SCRIPT_FILENAME vs. PATH_TRANSLATED
 
Quote:

Originally Posted by bogus
In particular : SCRIPT_FILENAME seems to be available only to script handlers whereas PATH_TRANSLATED seems to be available only to context handlers... In both case the FastCGI is a RESPONDER.

So I'm a bit confused here, because I'm trying to make php work as a context handler (to have a remote PHP process without duplicating the doc_tree in both places). But PHP seems to rely on SCRIPT_FILENAME only. So it does not work.

Is LSWS behavior the standard, or is PHP wrong ? Or I'm missing something (as usual :cry: )

The behavior of LSWS you observed is correct and as designed. We are not sure it is standard or not, I think it make sense this way. As a context handler, web server does not know exactly the URL points to a script file or not, so only PATH_TRANSLATED is set.
Glad you found the solution already.

Best Regards.


All times are GMT -7. The time now is 12:35 PM.