ID:               49744
 Updated by:       sjo...@php.net
 Reported By:      michael dot cordover+php at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Linux
 PHP Version:      5.2.11
 New Comment:

Please enable error_reporting and display_errors. Are you seeing an
error like this?

Warning: Unterminated comment starting line 9 in
/data/home/sjoerd/public_html/svnreps/test/a.php on line 9
Fatal error: fatal flex scanner internal error--end of buffer missed in
/data/home/sjoerd/public_html/svnreps/test/a.php on line 9


Previous Comments:
------------------------------------------------------------------------

[2009-10-02 04:23:05] michael dot cordover+php at gmail dot com

It should be noted that the following code does not create this error.

<?php

echo 'Test';

if (false) {
  
}

/*

?> */

------------------------------------------------------------------------

[2009-10-02 04:19:00] 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 r...@[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 this bug report at http://bugs.php.net/?id=49744&edit=1

Reply via email to