LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > FastCGI : SCRIPT_FILENAME vs. PATH_TRANSLATED

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2004, 09:32 AM
bogus bogus is offline
Member
 
Join Date: Dec 2003
Location: Brittany / France / Europe
Posts: 31
Default 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.
Reply With Quote
  #2  
Old 03-21-2004, 10:15 AM
bogus bogus is offline
Member
 
Join Date: Dec 2003
Location: Brittany / France / Europe
Posts: 31
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.
Reply With Quote
  #3  
Old 03-21-2004, 11:06 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Default 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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FastCGI spawning more processes jooray Bug Reports 7 01-02-2007 03:50 PM
unable to create fastcgi PHP on Linux jooray General 2 12-31-2006 04:34 AM
FastCGI > LSAPI ? Jetro Feedback/Feature Requests 6 10-19-2005 09:48 AM
503 Service Unavailable - while setting up Perl FastCGI nigel CGI/Perl/Python 1 02-15-2005 06:15 AM
FastCGI responders bogus Install/Configuration 3 12-08-2003 09:31 AM


All times are GMT -7. The time now is 08:27 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.