How to configure logs in PHP5 in window

Source: Internet
Author: User
How to configure logs in PHP5 in window My development environment is Nginx + PHP. The environment is simple and convenient, but I still cannot find the PHP log file. how can I generate a PHP log file?

PHP version: PHP 5.6 (5.6.3) VC11 x64 Non Thread Safe


Reply to discussion (solution)

It seems that php itself does not have any logs. logs can only be implemented in the code when php is running. you can set error_reporting (E_ALL). errors will be displayed when php reports an error, however, if nginx is used, nginx needs to modify the configuration file. if it is not modified, an error can only be displayed in the nginx error log. for details, refer to here.

Php. ini settings

Error_reporting = E_ALL
Log_errors = On
Display_errors = Off
Error_log = php_errors.log

Display_errors = Off to display_errors = On

It seems that php itself does not have any logs. logs can only be implemented in the code when php is running. you can set error_reporting (E_ALL). errors will be displayed when php reports an error, however, if nginx is used, nginx needs to modify the configuration file. if it is not modified, an error can only be displayed in the nginx error log. for details, refer to here.



It seems that log output cannot be specified separately on Windows, which is confusing.
Related Article

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.