Why is the PHP-FPM error log not displayed under Nginx?

Source: Internet
Author: User
I configured the LNMP environment in Ubuntu, and Nginx configured the error log and access log, everything is normal. at the same time, the PHP-FPM in poolwww. error_log is configured in conf. {code ...} at the same time, I printed phpinfo (); for example: But my php-error.log is no error day...

I configured the LNMP environment in Ubuntu, and Nginx configured the error log and access log, everything is normal.

The PHP-FPM also configures error_log in pool/www. conf.

catch_workers_output = yesphp_admin_value[error_log] = /home/liyi/logs/php-error.logphp_admin_flag[log_errors] = on

At the same time, I printed phpinfo (); for example:

But my php-error.log is not the error log, but in the nginx error log printed the php fatal error message.

Nginx error logs include:

PHP error logs are completely blank.

If I switch to the Homestead virtual machine, everything is normal, and php error_log is displayed normally.

How can I configure php error logs?

Reply content:

I configured the LNMP environment in Ubuntu, and Nginx configured the error log and access log, everything is normal.

The PHP-FPM also configures error_log in pool/www. conf.

catch_workers_output = yesphp_admin_value[error_log] = /home/liyi/logs/php-error.logphp_admin_flag[log_errors] = on

At the same time, I printed phpinfo (); for example:

But my php-error.log is not the error log, but in the nginx error log printed the php fatal error message.

Nginx error logs include:

PHP error logs are completely blank.

If I switch to the Homestead virtual machine, everything is normal, and php error_log is displayed normally.

How can I configure php error logs?

1. check whether your program has the write permission under the error_log Directory. it mainly depends on the identity of the php-fpm you are running;

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.