Edit report at http://bugs.php.net/bug.php?id=24502&edit=1

 ID:                 24502
 Updated by:         j...@php.net
 Reported by:        gwang at litespeedtech dot com
 Summary:            Fast CGI interface is broken
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   Linux
 PHP Version:        4.3.4 dev
 Assigned To:        shane
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2003-09-30 11:19:14] gwang at litespeedtech dot com

I did read the comments, my understanding is that  PATH_TRANSLATED will
be fixed to conform to the CGI spec if it does not. It is great for
those guys who do not follow CGI spec. 



The problem is when CGI spec has been followed, PATH_TRANSLATED is the
translated PATH_INFO, SCRIPT_FILENAME is the path to the PHP script,
enabling fix_pathinfo will clear PATH_INFO and PATH_TRANSLATED (set them
to NULL), it will be a disaster for CGI script needs PATH_INFO. 



fix_pathinfo and discar_path is not necessary at all when the spec has
been followed.



If you want, try it with our web server, it only take about 5 minutes to
install, PHP (4.3.1) works out of box without any additional
configuration. Just replace lsws/fcgi-bin/php with new PHP executable.



Thanks,

Litespeed

------------------------------------------------------------------------
[2003-09-29 21:48:07] sni...@php.net

Read the note above the cgi.fix_pathinfo in php.ini-dist (found in the
release tarball). There is no bug.



------------------------------------------------------------------------
[2003-07-04 16:53:44] gwang at litespeedtech dot com

Description:
------------
Fast CGI interface is broken in both 4.3.2 4.3.3rc1 and the most recent
snap shot for web server with Fast CGI implementation that follows CGI
specification.

Our LiteSpeed web server (at http://www.litespeedtech.com ) supports PHP
through the Fast CGI interface (faster than Apache's mod_php). Our Fast
CGI implementation follows the CGI specification and set environment
variables exactly as what Apache's CGI does. It set
SCRIPT_FILENAME=/docroot/info.php and works fine with 4.3.1, but the
interface is broken since 4.3.2.

Our test shows that 

SG(request_info).path_translated 

is not populated with the value of SCRIPT_FILENAME but is NULL.

Further study shows that the root cause is at cgi-main.c:812 in release
4.3.2

> script_path_translated=env_path_translated;

set script_path_translated to NULL or whatever the value of
PATH_TRANSLATED. If we take that line out, every thing works fine.

We can use --enable-discard-path to avoid it but it is forbidden in
README.FastCGI (We don't know why based on our reading of the source
code).

I think one possilbe fix is to avoid that line of code for FastCGI, but
may need to add some code for Apache's mod_fastcgi. Or change the
document, say: --enable-discard-path should be used for web server
follows CGI Specs.  



Sincerely,

LiteSpeed Team

 



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=24502&edit=1

Reply via email to