• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

FastCGI and CGI don't work after upgrade to 11.5

michelinux

New Pleskian
I've upgraded one of my servers to Plesk panel 11.5.30 so that I can use two PHP versions on the same server

Now both of PHP versiond don't work in CGI or FastCGI mode (500 internal server error)

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

suexec_log says:
uid: (10005/xxxxx) gid: (506/506) cmd: cgi_wrapper

seexec and cgi_wrapper permissions are ok:
-r-s--x--- 1 root apache 24416 11 ago 10:09 /usr/sbin/suexec
-rwxr-xr-x 1 root root 19536 24 lug 13:16 /var/www/cgi-bin/cgi_wrapper/cgi_wrapper

Just to be sure, I've copied /usr/sbin/suexec from another (working) server

this is my /etc/httpd/conf.d/fcgid.conf:
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
FcgidMinProcessesPerClass 0
FcgidConnectTimeout 30
FcgidIOTimeout 45
FcgidInitialEnv RAILS_ENV production
FcgidIdleScanInterval 10
FcgidMaxRequestLen 104857600
</IfModule>

ls -al /var/run/mod_fcgid/
drwxr-xr-x 3 apache apache 4096 11 ago 10:10 .
drwxr-x--x 20 root root 4096 11 ago 10:10 ..
-rw-r--r-- 1 root root 8 11 ago 10:10 fcgid_shm
drwxrwxrwx 2 apache apache 4096 11 ago 10:19 sock

What can I do?
 
Check the forum for the answer, the key is the safe_mode=off and magic_quotes_gpc=off
 
Need to setup for each domain, go to domain settings, where you setup as FastCGI and there is PHP Settings tab, there you need to setup.
 
Need to setup for each domain, go to domain settings, where you setup as FastCGI and there is PHP Settings tab, there you need to setup.

Thank you for your answers but still no help:
I've changed these setting for a domain, verified that /var/www/vhosts/system/DOMAIN/etc/php.ini has changed accordingly, restarted apache, but I still have 500 Internal Server Error

I also tried this:
cd /var/www/vhosts/DOMAIN/httpdocs
su -c 'php-cgi -c /var/www/vhosts/system/DOMAIN/etc/php.ini index.php' USER
and it seems to work correctly:

X-Powered-By: PHP/5.3.27
Set-Cookie: 3178f9b30235ae81e9d50f2638c2cb16=734ce6691999972cf3b4e4fae3bc1e7b; path=/
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Pragma: no-cache

Seem is not a PHP issue but a cgi_wrapper one
 
tail -f /var/www/vhosts/DOMIN/statistics/logs/error_log - check there, should be enough info. From my test, you still get errors if your PHP code still have 5.4 incompatibilities. for example CS Cart will not work with 5.4 and will give this 500 error. Enable also errors on screen and then you can check there.
 
Back
Top