Bug #66276 [Opn->Ver]: Missing HTTP headers on CORE_ERROR output of php.cgi
| From: | cmb@php.net | Date: | Fri, 06 Aug 2021 16:37:28 +0000 |
| Subject: | Bug #66276 [Opn->Ver]: Missing HTTP headers on CORE_ERROR output of php.cgi | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235652@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66276&edit=1
ID: 66276
Updated by: cmb@php.net
Reported by: dave at icdsoft dot com
-Summary: Missing HTTP headers on CORE_ERROR output of
php54.cgi
+Summary: Missing HTTP headers on CORE_ERROR output of php.cgi
-Status: Open
+Status: Verified
Type: Bug
Package: CGI/CLI related
-Operating System: Linux
+Operating System: *
-PHP Version: 5.4.22
+PHP Version: 7.4
Block user comment: N
Private report: N
New Comment:
I can confirm that this is still an issue with PHP-7.4 and most
likely PHP 8 as well. I'm not sure whether this can be fixed
generally. However, many fatal errors have already been converted
to Error exceptions, so this is less of an issue with current PHP
versions.
Previous Comments:
------------------------------------------------------------------------
[2013-12-12 15:23:52] dave at icdsoft dot com
Description:
------------
The error handling of php54.cgi does not submit HTTP headers in some cases. This causes Internal
Server Error 500 in Apache.
$ php54.cgi <test.php
<br />
<b>Fatal error</b>: Directive 'magic_quotes_gpc' is no longer available in
PHP in <b>Unknown</b> on line <b>0</b><br />
For other errors the headers are ok
$ php54.cgi <test.php
X-Powered-By: PHP/5.4.22
Content-type: text/html
<br />
<b>Parse error</b>: syntax error, unexpected 'df' (T_STRING) in
<b>-</b> on line <b>3</b><br />
Test script:
---------------
$ cat test.php
<?php
phpinfo();
?>
$ cat php.ini
register_globals = on
Expected result:
----------------
X-Powered-By: PHP/5.4.22
Content-type: text/html
<br />
<b>Fatal error</b>: Directive 'magic_quotes_gpc' is no longer available in
PHP in <b>Unknown</b> on line <b>0</b><br />
Actual result:
--------------
<br />
<b>Fatal error</b>: Directive 'magic_quotes_gpc' is no longer available in
PHP in <b>Unknown</b> on line <b>0</b><br />
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66276&edit=1