#32066 [Bgs]: display_errors=off also suppresses output from php -l
| From: | marcus at synchromedia dot co dot uk | Date: | Mon, 14 Mar 2005 13:55:44 +0000 |
| Subject: | #32066 [Bgs]: display_errors=off also suppresses output from php -l | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77408@lists.php.net to get a copy of this message | ||
ID: 32066
User updated by: marcus at synchromedia dot co dot uk
Reported By: marcus at synchromedia dot co dot uk
Status: Bogus
Bug Type: PHP options/info functions
Operating System: RedHat Enterprise Linux 3
PHP Version: 5.0.3
New Comment:
You say:
> Error display ini setting affects all error reporting.
That's just not true. It may be that the behaviour has
changed in PHP5 (in which case it should be documented
here: http://www.php.net/manual/en/
ref.errorfunc.php#ini.display-errors),
but in PHP4 having display_errors=off does NOT suppress
error messages from php -l. It's very easy to reproduce
in PHP4:
The output from 'php -i|grep display_errors' is:
display_errors => Off => Off
and yet php -l on the example I gave produces:
PHP Parse error: parse error, unexpected ';' in
test.php on line 2
Errors parsing test.php
Under PHP5 it does NOT work this way - the behaviour HAS
changed to the behaviour you said.
If what you said is MEANT to be true, then this bug
should be closed, rephrased as 'display_errors=off does
not
suppress output from php -l' and re-reported as a PHP4
bug - it's got to be a bug one way or the other.
Personally I'd like php-l to ignore the display_errors
setting, just as it does in PHP4, which is why I
reported the discrepancy in the first place.
Previous Comments:
------------------------------------------------------------------------
[2005-02-23 19:32:55] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Error display ini setting affects all error reporting.
------------------------------------------------------------------------
[2005-02-22 16:07:50] marcus at synchromedia dot co dot uk
Description:
------------
In php5, if php.ini contains a display_errors=off
directive, it also suppresses error details from 'php
-l' on a command line. I guess this could be a
deliberate change in pHP5, but it is really not very
helpful as php -l will only ever be run by developers.
This is in contrast to php4, which always shows errors
from php -l, even if display_errors is off.
Reproduce code:
---------------
execute this script (containing a deliberate error) using php -l on a
command line with display_errors turned off
<?php
print trim('hello';
?>
Expected result:
----------------
Parse error: parse error, unexpected ';' in /home/
username/error.php on line 2
Actual result:
--------------
no output is generated at all.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32066&edit=1