PHP 4.0 Bug #3594: simple syntax errors result in Document Contains no Data
| From: | sbeam at beeline dot net | Date: | Wed, 23 Feb 2000 23:06:03 +0000 |
| Subject: | PHP 4.0 Bug #3594: simple syntax errors result in Document Contains no Data | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15912@lists.php.net to get a copy of this message | ||
From: sbeam@beeline.net
Operating system: Linux RH 6.1
PHP version: 4.0 Beta 3
PHP Bug Type: Scripting Engine problem
Bug description: simple syntax errors result in Document Contains no Data
parsing or syntax errors sometimes produce a complete parser bailout, giving the user "Document
contains no data". Usually we get "parse error at line XX" as expected but with
certain types of errors, in certan combinations, we just get the whole lotta nothing. Mostly these
are unmatched single quotes, brackets and parens. Following are some complete scripts that reliably
cause this on our system:
#1:
<?php
echo "great " . ' googily . " moogily";
?>
=============
#2:
<?php
function foo() {
return "hello kitty";
}
echo foo); ?>
===========
#3:
<?php
function foo()
return "hello kitty";
}
echo foo(); ?>
This might seem like a trivial thing since these are so obvious but in a large script it makes it
basically impossible to track down several errors like this, especially when hairer complex
expressions are used.
Here is the relevant section of php.ini:
error_reporting = 7
display_errors = On
log_errors = On
track_errors = On
this is how PHP was configured:
./configure --with-mysql --with-pgsql=/usr/bin --with-apache=../apache -enable-track-vars=on
Thx!