Why Nginx under PHP-FPM error log is not displayed

Source: Internet
Author: User

I configured the LNMP environment under Ubuntu, where nginx configured the error log and access log, everything is OK.

At the same time PHP-FPM is configured with 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 print phpinfo (), such as:

But my php-error.log is no error log, but in the Nginx error log printed out the PHP fatal error message.

Nginx error log such as:

The PHP error log is completely blank.

I swapped with homestead virtual machine then everything is OK, php error_log normal display.

How do I configure the PHP error log?

Reply content:

I configured the LNMP environment under Ubuntu, where nginx configured the error log and access log, everything is OK.

At the same time PHP-FPM is configured with 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 print phpinfo (), such as:

But my php-error.log is no error log, but in the Nginx error log printed out the PHP fatal error message.

Nginx error log such as:

The PHP error log is completely blank.

I swapped with homestead virtual machine then everything is OK, php error_log normal display.

How do I configure the PHP error log?

1. Check your program to the Error_log directory under the permission to write, mainly to see what identity you are running PHP-FPM;

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