Ubuntu to open the PHP debug mode error message Solution _linux

Source: Internet
Author: User
Tags php debug

Open PHP debug mode under Ubuntu Error information solution

In Ubuntu, the default setting for PHP is not to display the error message, and if the program error will show "Unable to handle this request error prompt", this is very inconvenient in the development environment.

Actually, we just need to edit the Apache configuration file.

1, my Apache configuration file directory is/etc/apache2/apache2.conf

sudo vim/etc/apache2/apache2.conf

Add the following two lines to the end

Php_flag display_errors    on
php_value error_reporting    2039

2, restart Apache

sudo service apache2 restart

This completes the display of the error message.

Note: If you are not able to change the configuration under php.ini (I do not change it can be displayed, because the code added above has been opened)

sudo vim/etc/php/7.0/cli/php.ini

Search display_errors default is display_errors=off change to Display_errors=on save quit reboot Apache2 can

Thank you for reading, I hope to help you, thank you for your support for this site!

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.