(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server

Created:

2016-11-16 12:48:02 UTC

Modified:

2017-04-24 11:04:31 UTC

0

Was this article helpful?


Have more questions?

Submit a request

(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Website does not browse content properly or shows Internal Server Error . Similar records can be found in Apache error log /var/log/httpd/error_log :

[error] [client 1.1.1.1] Premature end of script headers: cgi_wrapper
[warn] [client 1.1.1.1] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[error] [client 1.1.1.1] Premature end of script headers: ppp.php

Listing php_handlers by execution of the following command results in error:

# /usr/local/psa/admin/sbin/php_handlers_control --list-json
Error reading /etc/psa/php_versions.json: can not parse php_versions_info object : JSON object is expected. Error occured at offset 0, character '\\x00'.

Cause

Corrupted /etc/psa/php_versions.json file.

Resolution

  1. Make sure that /etc/psa/php_versions.json exists and have correct permissions:

    # ls -la /etc/psa/php_versions.json
    -rw-r--r-- 1 root root 0 Apr 7 15:14 /etc/psa/php_versions.json
  2. Check your PHP version:

    # php -v
    PHP 5.4.37 (cli) (built: Jan 26 2015 12:11:30)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader v4.6.0, Copyright (c) 2002-2014, by ionCube Ltd
  3. Edit /etc/psa/php_versions.json adding PHP handler records according to installed version. For PHP 5.4.37 on CentOS/RHEL it should look like:

    # cat /etc/psa/php_versions.json
    {"php":[
    {
    "id":"module",
    "path":"/usr/bin/php-cgi",
    "clipath":"",
    "phpini":"/etc/php.ini",
    "version":"5.4.37",
    "displayname":"5.4.37",
    "type":"module",
    "system":false
    },
    {
    "id":"fastcgi",
    "path":"/usr/bin/php-cgi",
    "clipath":"",
    "phpini":"/etc/php.ini",
    "version":"5.4.37",
    "displayname":"5.4.37",
    "type":"fastcgi",
    "system":false
    },
    {
    "id":"cgi",
    "path":"/usr/bin/php-cgi",
    "clipath":"",
    "phpini":"/etc/php.ini",
    "version":"5.4.37",
    "displayname":"5.4.37",
    "type":"cgi",
    "system":false
    }
    ]}
  4. Reread Plesk PHP handlers:

    # /usr/local/psa/admin/sbin/php_handlers_control --reread
  5. Add you custom PHP handler if you have it using command:

    # /usr/local/psa/admin/sbin/php_handlers_control --add
Have more questions? Submit a request
Please sign in to leave a comment.