• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

PHP support over FastCGI does not work

N

N3cTr0

Guest
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
 
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?
 
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?
 
where are another info?
>examine domain apache config - examine php handler, should be like
>check script permission - 0755?
 
Back
Top