1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

PHP support over FastCGI does not work

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by N3cTr0, Jan 19, 2011.

  1. N3cTr0

    N3cTr0 Guest

    0
     
    Hi,

    Trying to get PHP5 over FastCGI to work and I am having some issues:

    I am getting errors similiar to these:
    [Thu Jul 02 08:56:58 2009] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
    [Thu Jul 02 08:56:58 2009] [error] [client 123.123.123.123] Premature end of script headers: test.php

    I have read the article over at http://kb.odin.com/en/6380 and I have done everything it says and according the that it should work but I still get the same errors the whole time. Can someone assist?

    Here is what I did:

    [root@cp contrib]# rpm --force -Uhv /root/parallels/PSA_10.0.1/dist-rpm-RedHat-el5-x86_64/contrib/psa-php5-configurator-1.6.0-rhel5.build109101020.10.noarch.rpm
    Preparing... ########################################### [100%]
    1:psa-php5-configurator ########################################### [100%]
    ===> configuring php5 using /etc/php.ini file
    Trying to set memory limit to 32M... done
    Trying to set max_execution_time to 60... done
    Trying to set upload_max_filesize to 10M... done
    Trying to add '.' to 'include_path'... nothing to be done
    done
    Trying to set 'short_open_tag' to On... done
    Trying to set 'file_uploads' to On... done
    Trying to set 'safe_mode' to On... done
    Trying to set 'safe_mode' to Off... done
    [root@cp contrib]# cd /usr/bin
    [root@cp bin]# find *php*
    php
    php-cgi
    [root@cp bin]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
    [root@cp bin]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-server
    [root@cp bin]# grep CGI_PHP_BIN /etc/psa/psa.conf
    CGI_PHP_BIN /usr/bin/php-cgi

    Please help. I have clients that need to use PHP5.

    Kind Regards,
    Graeme
     
  2. fogelf

    fogelf Regular Pleskian

    23
    37%
    Joined:
    Feb 10, 2010
    Messages:
    103
    Likes Received:
    0
    1. cat /etc/httpd/conf.d/fcgid.conf
    2. ll /var/run/mod_fcgid/fcgid_shm
    3. examine domain apache config - examine php handler, should be like
    <IfModule mod_fcgid.c>
    <Files ~ (\.php)>
    SetHandler fcgid-script
    FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
    Options +ExecCGI
    allow from all
    </Files>
    </IfModule>
    3. check script permission - 0755?
     
  3. N3cTr0

    N3cTr0 Guest

    0
     
    Hi, Here is the results of above:

    LoadModule fcgid_module modules/mod_fcgid.so

    <IfModule mod_fcgid.c>

    <IfModule !mod_fastcgi.c>
    AddHandler fcgid-script fcg fcgi fpl
    </IfModule>

    FcgidIPCDir /var/run/mod_fcgid/sock
    FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

    FcgidIdleTimeout 40
    FcgidProcessLifeTime 30
    FcgidMaxProcesses 20
    FcgidMaxProcessesPerClass 8
    FcgidConnectTimeout 30
    FcgidIOTimeout 45
    FcgidInitialEnv RAILS_ENV production
    FcgidIdleScanInterval 10

    </IfModule>
    [root@cp /]# ll /var/run/mod_fcgid/fcgid_shm
    -rw-r--r-- 1 root root 8 Jan 20 10:01 /var/run/mod_fcgid/fcgid_shm
    [root@cp /]#

    Can you see anything wrong with it?
     
  4. fogelf

    fogelf Regular Pleskian

    23
    37%
    Joined:
    Feb 10, 2010
    Messages:
    103
    Likes Received:
    0
    where are another info?
    >examine domain apache config - examine php handler, should be like
    >check script permission - 0755?
     
  5. metalalisa

    metalalisa Basic Pleskian

    18
    85%
    Joined:
    Dec 9, 2010
    Messages:
    61
    Likes Received:
    0
    Use CGI mode
     
Loading...