#49744 [NEW]: Multi-line comment at EOF causes no output
| From: | michael dot cordover+php at gmail dot com | Date: | Fri, 02 Oct 2009 04:19:00 +0000 |
| Subject: | #49744 [NEW]: Multi-line comment at EOF causes no output | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-143176@lists.php.net to get a copy of this message | ||
From: michael dot cordover+php at gmail dot com
Operating system: Linux
PHP version: 5.2.11
PHP Bug Type: Reproducible crash
Bug description: Multi-line comment at EOF causes no output
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).
--
Edit bug report at http://bugs.php.net/?id=49744&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49744&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49744&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49744&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49744&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49744&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49744&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49744&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49744&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49744&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49744&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49744&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49744&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49744&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49744&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49744&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49744&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49744&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49744&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49744&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49744&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49744&r=mysqlcfg