PHP Close Warning Problem Solving method, phpwarning_php tutorial

Source: Internet
Author: User

PHP off warning problem resolution, phpwarning


Error_reporting set the level of error message return

2047 I remember it was e_all.

There are many configuration settings in the php.ini file. You should have your own php.ini file set up and put it in the appropriate directory, as shown in the documentation for installing PHP and Apache 2 on Linux (see Resources). When debugging a PHP application, you should know two configuration variables. The following are the two variables and their default values:

Display_errors = Off
error_reporting = E_all

E_all can be from bad coding practices to harmless prompts to all information that goes wrong. E_all is a bit too thin for the development process because it shows hints on the screen for small things (such as variables not initialized), which can mess up the browser's output

So it is not recommended to use 2047, it is best to change the default value to: error_reporting = E_all & ~e_notice

Resolution of display_errors = off failure in php.ini

Problem:

PHP settings file php.ini has been set display_errors = Off, but during the run, the page will still appear error message.

Solve:

After checking log_errors= on, according to the official statement, when this log_errors is set to ON, then you must specify the Error_log file, if not specified or the specified file does not have permission to write, so will output to the normal output channel, then also makes the Display_ Errors this specified off fails, the error message is printed out. So the log_errors = Off, the problem is solved.

Often see error_reporting (7) straight meaning: Set the level of error message return.

Value constant
1 E_error
2 e_warning
4 E_parse
8 E_notice
E_core_error
E_core_warning
E_compile_error
E_compile_warning
E_user_error
E_user_warning
1024x768 E_user_notice
2047 E_all
2048 e_strict
However 7=1+2+4

It's just a mistake. 1 e_error 2 e_warning 4 e_parse

The above this PHP close warning problem solution is small series to share all the content, I hope to give you a reference, but also hope that we have a lot of support to help guests home.

http://www.bkjia.com/PHPjc/1127860.html www.bkjia.com true http://www.bkjia.com/PHPjc/1127860.html techarticle PHP off warning problem resolution, phpwarning error_reporting set error message return level 2047 I remember e_all. There are many configuration settings in the php.ini file. You should ...

  • 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.