Script found and interpreted but header status 404 is set

From: Date: Wed, 08 Jun 2005 22:13:45 +0000
Subject: Script found and interpreted but header status 404 is set
Groups: php.windows 
Request: Send a blank email to php-windows+get-26084@lists.php.net to get a copy of this message
Hi, I'm running PHP 5.0.4 on Windows XP, under Jetty, a Java HTTP Server and Servlet container. The container is configured to pass *.php requests to a CGI servlet which execs php-cgi.exe Everything seems to work fine and the expected text/html output is returned, however PHP is always setting Status 404 (ie Not Found) even though the script is being found and interpreted. I didn't notice this on firefox because it renders the text/html anyway, but wget sees the 404 and stops. Interestingly if I call php-cgi.exe c:\unison\web\test.php from the command line without supplying any CGI environment variables I see the same expected html output but with a Status 200 header. Is this a bug? or do I have some further configuration work to do? I've attached the request/response headers and the "Environment" section from phpinfo() if that gives anyone some ideas. Cheers, Grant. GET /test.php HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.x 404 Not Found Date: Wed, 08 Jun 2005 21:54:26 GMT Server: Jetty/5.1.4 (Windows XP/5.1 x86 java/1.4.2_06 Status: 404 Content-Type: text/html X-Powered-By: PHP/5.0.4 Transfer-Encoding: chunked SCRIPT_NAME /test.php HTTP_HOST localhost:8080 HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7 REDIRECT_STATUS 200 PATH_INFO no value HTTP_ACCEPT_LANGUAGE en-us,en;q=0.5 HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 REMOTE_ADDR 127.0.0.1 REQUEST_METHOD GET PATH_TRANSLATED no value HTTP_KEEP_ALIVE 300 SystemRoot C:/WINDOWS CONTENT_LENGTH -1 HTTP_ACCEPT_ENCODING gzip,deflate AUTH_TYPE no value GATEWAY_INTERFACE CGI/1.1 QUERY_STRING no value REMOTE_USER no value HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 HTTPS OFF HTTP_CONNECTION keep-alive CONTENT_TYPE no value REMOTE_HOST 127.0.0.1 ORIG_SCRIPT_NAME /test.php DOCUMENT_ROOT C:/unison/web The Java "Runtime.exec()" method is being passed C:\PHP\php-cgi.exe C:\unison\web\test.php with C:\unison\web set as the working directory and the above environment variables. test.php contains.... <?php phpinfo(); ?>

« previous php.windows (#26084) next »