ID: 28391
Comment by: wb at pro-net dot co dot uk
Reported By: fred at bitwyze dot com
Status: Open
Bug Type: Zend Engine 2 problem
Operating System: Linux Red Hat 8.0
PHP Version: 5.0.0RC2
New Comment:
I am also seeing the same issue with the token_get_all() function
produceing a
PHP Fatal Error: start-condition stack underflow
Now 99% of the time i will not get this error but it just appears for
no real reason the other 1% of the time even though nothing has
changed.
Im using FreeBSD + PHP 5.0.0
Previous Comments:
------------------------------------------------------------------------
[2004-05-14 00:43:26] fred at bitwyze dot com
Description:
------------
When there is a parse error in an included file before a call to
token_get_all the error is printed out and execution is stoped.
I fix the error in the include file and reload the file that is
including it and get;
"Fatal error: start-condition stack underflow in /index.php on line 4"
I reload my browser, same thing. I hit reload for a minute or two
still getting the stack underflow error. Then magically after some
time of hitting refresh it disapears and gives the the correct output.
If I restart the web server the stack underflow error goes away.
It happens is both php5-200405131630 and 5.0.0RC32 compiled with the
same flags
'./configure' '--with-apxs=/web/apache/bin/apxs' '--enable-track-vars'
'--enable-force-cgi-redirect' '--with-gettext'
'--with-mysql=/usr--with-freetype' '--enable-gd-native-ttf'
'--with-fdftk=/usr/local' '--with-zlib=/usr' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--with-tiff-dir=/usr--with-jpeg-dir=/usr'
'--with-zlib-dir=/usr' '--with-pdflib=/usr/local'
'--with-pdflibpsp=/usr/local' '--with-xml' '--with-expat-dir=/usr'
'--with-iconv=/usr/local' '--with-xmlrpc' '--enable-dbase'
'--disable-debug' '--with-pgsql'
'--with-config-file-path=/usr/local/lib/php5.ini'
Reproduce code:
---------------
<?
include('./somefile.php');
$tokens = token_get_all("<?php if (\$foo) echo \$foo; ");
echo count($tokens);
?>
somefile.php that gets included
<?
fsdo->
class style {
}
?>
Expected result:
----------------
12
Actual result:
--------------
"Fatal error: start-condition stack underflow in /index.php on line 4"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28391&edit=1