|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-10-02 04:19 UTC] michael dot cordover+php at gmail dot com
Description:
------------
An unterminated multi-line comment (i.e. /* without */) that runs to the end of the file causes the parser to stop upon encountering certain functions (phpinfo() and trigger_error() verified; others not checked).
This behaviour did not occur in 5.2.5 but does occur in 5.2.10
Environment:
PHP Version 5.2.10
FreeBSD [host-removed] 6.2-RELEASE-p12 FreeBSD 6.2-RELEASE-p12 #3: Tue Apr 14 20:41:44 UTC 2009 root@[host-removed]:/usr/obj/usr/src/sys/SERVER i386
Build Date Jul 2 2009 15:29:12
Configure Command './configure'
Server API Apache
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Apache Version Apache
Apache Release 10339100
Apache API Version 19990320
Reproduce code:
---------------
<?php
echo 'Test';
if (false) {
phpinfo();
}
/*
?>
Expected result:
----------------
HTTP 200 OK HEAD
Associated default PHP headers (Date, Connection, Proxy-Connection, Content-Type, Server, X-Powered-By)
Body content 'Test' (content-length 4)
This result is obtained by removing the block comment opener (/*) or by closing the block comment, even if closed AFTER ?>
Actual result:
--------------
HTTP 500 Internal Server Error in HEAD
Default PHP headers (Date, Connection, Proxy-Connection, Date, Content-Type, Server, X-Powered-By)
No output (content-length 0)
No error logged by Apache
Apache does not load ErrorDocument 500
I am unfortunately not in a position to generate a backtrace (shared hosting).
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Jan 01 23:00:01 2026 UTC |
It should be noted that the following code does not create this error. <?php echo 'Test'; if (false) { } /* ?> */