PHP Error Reporting settings are always invalid

Source: Internet
Author: User
Tags php error php error reporting
win8.1+apache2.4+php5.6.11

Set in Php,ini
error_reporting = E_all
Display_errors = On

However, the Web browser always does not display an error message when it is actually running. The Error.log file in Apache has a record of error messages:

Only set in PHP file
Ini_set (' display_errors ', 1);
Error_reporting (E_all);
The Web browser will not display the error message.


Reply to discussion (solution)

That's because the php.ini you're modifying isn't the one you're using.

That's because the php.ini you're modifying isn't the one you're using.




Configuration File (php.ini) Path C:\Windows
Loaded Configuration File D:\php5_6_11\php.ini

The above is the information I get from running Phpinfo ().
The php.ini that is loaded is displayed correctly:

Confirm that the modified php.ini is D:\php5_6_11\php.ini this file, modified and restart the server to take effect.

Confirm that the modified php.ini is D:\php5_6_11\php.ini this file, modified and restart the server to take effect.



It is very certain that the php.ini file is D:\php5_6_11\php.ini this file,
and also restarted the server.

So I wonder why the error reporting level set in php.ini is not valid.

So what's your error code? Stick it out and look.

Post your changes to php.ini.
Post the display_errors item in the Phpinfo report

Post your changes to php.ini.
Post the display_errors item in the Phpinfo report



Settings in the php.ini


Phpinfo's report




Apache?

Are there php_value items in httpd.conf and. htaccess?

Apache?

Are there php_value items in httpd.conf and. htaccess?




Yes, Apache server.
It is useless to set the Php_value in httpd.conf.
Such as



is a Windows system, there is no. htaccess file:

Know why, I did not restart the Apache server with administrator privileges after modifying php.ini

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.