PHP CGI shows error 500 when I browse domain php page: failed to load external entity "/etc/php-fpm.conf

Refers to:

  • Plesk 11.5 for Linux

Created:

2016-11-16 12:55:08 UTC

Modified:

2016-12-21 19:32:03 UTC

0

Was this article helpful?


Have more questions?

Submit a request

PHP CGI shows error 500 when I browse domain php page: failed to load external entity "/etc/php-fpm.conf

Symptoms

  1. PHP CGI shows error, 500 when I browse domain php page.

  2. From strace logs:

    write(2, "failed to load external entity \\"/etc/php-fpm.conf\\"\

    ", 51) = 51 write(2, "Feb 28 04:03:13.051089 [ERROR] fpm_conf_init_main(), line 522: failed to load configuration file: failed to parse conf file\", 124) = 124

  3. From apache logs (/etc/httpd/logs/error_log):

    I/O warning : failed to load external entity "/etc/php-fpm.conf"
    [ERROR] fpm_conf_init_main(), line 522: failed to load configuration file: failed to parse conf file
  4. PHP-CGI fails with error:

    # /usr/bin/php-cgi -c /etc/.php.ini
    I/O warning : failed to load external entity "/etc/php-fpm.conf"
    Feb 28 06:00:01.927012 [ERROR] fpm_conf_init_main(), line 522: failed to load configuration file: failed to parse conf file

Cause

System tries to load PHP-FPM configuration file, but it is absent. Php-fpm package is not installed.

Resolution

1) If you use custom PHP installation: Php-fpm instead of PHP CGI, please check if you have config file /usr/bin/php-config.

2) Check configuration in this file:

    # less /usr/bin/php-config |grep fpm.conf
'--with-fpm-conf=/etc/php-fpm.conf' '--with-fpm-log=/var/log/php-fpm.log' '--with-fpm-pid=/var/run/php-fpm.pid'

3) Check if file /etc/php-fpm.conf exists. If it is absent, please install php-fpm package with yum install php-fpm command and configure PHP with your system administrator.

Have more questions? Submit a request
Please sign in to leave a comment.