ID: 14409 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Apache related Operating System: IRIX64 vega 6.5 04191225 IP27 PHP Version: 4.2.2 New Comment:
By default, the PHP executable runs in CGI mode and produces an HTTP header "Content-type: text/html" Since PHP runs in CGI mode, it should follow the CGI/1.1 specification, which has not changed in so long that it might even pre-date PHP! I refer you to: http://hoohoo.ncsa.uiuc.edu/cgi/out.html If PHP is going to leave something like the following in my Apache error log: PHP Fatal error: Unable to open /pub/a/b/acb.com/index3.html in Unknown on line 0 when it is unable to find a target file, then I would expect it to either return an error page 404 Not Found, or exit non-zero, at which point Apache will return 500 Server Error. Under NO circumstance should a PHP Fatal error return a 200 OK to the client, which is implicitly done by Apache as per the CGI/1.1 spec when Apache receives pieces of a valid HTTP header without "Status: xxx" specified. Incorrect PHP behavior confirmed on PHP 4.2.2 on Linux 2.4.18, RedHat 7.2. PHP custom compiled with: './configure' '--prefix=/usr/local/php' '--enable-memory-limit' '--enable-force-cgi-redirect' '--enable-safe-mode' '--disable-rpath' '--with-mysql' '--with-db3' -Glenn Previous Comments: ------------------------------------------------------------------------ [2002-09-23 14:59:17] [EMAIL PROTECTED] Re-opening bug report. ------------------------------------------------------------------------ [2002-09-23 13:46:12] [EMAIL PROTECTED] Dear Kalowsky, I've just reproduced it on php4-200209200000 on Apache. It said php-4.3.0 in phpinfo(), and it is more recent than your post. You should understand that it is Apache-related bug, so IIS testing does not apply here, and it is stated in original bug report. Probably you also used php module in your testing on FreeBSD, while original bug report says that PHP was installed as CGI. The trouble looks to me as follows: if php CGI meets nonexistent php file, it does not output anything, while it should output error page, and I would really appreciate if I'd be able to tune that page via php.ini or whatever. Unfortunately, I can't reopen this bug, so someone please reopen it. Thank you. ------------------------------------------------------------------------ [2002-08-13 00:49:48] [EMAIL PROTECTED] Duplicated again with PHP 4.2.2 on Apache 1.3.23 under Windows XP. I don't have access to 3.0. ------------------------------------------------------------------------ [2002-08-10 09:59:27] [EMAIL PROTECTED] Unable to reproduce this on IIS with PHP 4.3.0-DEV, and on FreeBSD 4.6. Please try a newer version. Marking as closed, because I guess this was a valid bug, and has been fixed. ------------------------------------------------------------------------ [2002-07-31 09:01:16] [EMAIL PROTECTED] Forgot to tell you that it's an i386 Architecture :) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/14409 -- Edit this bug report at http://bugs.php.net/?id=14409&edit=1
