php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69307 PHP Errors and Warnings are not displayed
Submitted: 2015-03-26 11:55 UTC Modified: 2015-03-28 12:51 UTC
From: harikrishnan dot vkm186 at gmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.5.23 OS: Ubuntu 14.04 LTS
Private report: No CVE-ID: None
 [2015-03-26 11:55 UTC] harikrishnan dot vkm186 at gmail dot com
Description:
------------
No PHP errors are displayed when I execute php script via browser even if php error_reporting is set to E_ALL in php.ini . But it displays correctly when I execute the same via shell.

Test script:
---------------
Made syntax error in a php script and executed it via  web browser.

Expected result:
----------------
Errors are getting displayed if there is any.

Actual result:
--------------
No Errors or warnings,notices are displayed.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-26 12:01 UTC] harikrishnan dot vkm186 at gmail dot com
The exact php veron is PHP 5.5.9-1ubuntu4.4 (cli) (built: Sep  4 2014 06:56:34)
 [2015-03-26 12:21 UTC] cmb@php.net
-Status: Open +Status: Feedback
 [2015-03-26 12:21 UTC] cmb@php.net
Please execute the following script by requesting it with a
browser and report back its results:

    <?php
    
    var_dump(error_reporting());
    var_dump(ini_get('display_errors'));
 [2015-03-27 04:54 UTC] harikrishnan dot vkm186 at gmail dot com
-Status: Feedback +Status: Open
 [2015-03-27 04:54 UTC] harikrishnan dot vkm186 at gmail dot com
This was the result.

int(32767)
string(0) ""
 [2015-03-27 07:08 UTC] rasmus@php.net
-Status: Open +Status: Not a bug
 [2015-03-27 07:08 UTC] rasmus@php.net
You have display_errors disabled and errors are not being displayed. Everything appears to work as expected here.
 [2015-03-28 03:48 UTC] harikrishnan dot vkm186 at gmail dot com
But in php.ini it's enabled. 
display_errors = On

Also it's Default Value: On as per comments in php.ini
 [2015-03-28 04:07 UTC] requinix@php.net
As cmb's code showed, display_errors is off. Maybe you edited the wrong php.ini. Maybe you didn't restart the web server after changing it. Maybe you edited the setting in the description area at the top of the file, rather than the actual entry further down.
But the setting is definitely off.
 [2015-03-28 12:51 UTC] harikrishnan dot vkm186 at gmail dot com
Sorry, there was a 'display_errors = Off' at the end of file. You can close this bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC