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.