I can't change PHP handler to fastcgi
Hi folks,
Whenever i try to change the PHP handler to fastcgi via "WHM => Services Configuration => Configure PHP and suEXEC" i get an error message http 500 internal server error
tail /usr/local/apache/logs/error_log tells me
Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: forum.php
WHM seems to generate a file called php.conf with this content php.conf would be updated to: # This file was automatically generated by the Cpanel PHP Configuration system # If you wish to change the way PHP is being handled by Apache on your system, # use the /usr/local/cpanel/bin/rebuild_phpconf script or the WHM interface. # # Manual edits of this file will be lost when Apache is updated. # Fastcgi configuration for PHP5 LoadModule fcgid_module modules/mod_fcgid.so MaxRequestsPerProcess 500 AddHandler fcgid-script .php5 .php4 .php .php3 .php2 .phtml FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php5 FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php4 FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php3 FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php2 FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .phtml # End of autogenerated PHP configuration.
however the path /usr/local/cpanel/cgi-sys/php5 does not exist on my server and now i'm confused because usually "premature end of script headers" is a permissions related issue now i lost track :( suEXEC is enabled maybe that has something todo with it not sure. cat /etc/redhat-release CloudLinux Server release 6.6 (Leonid Kizim) CPanel /Whm 11.46.0
WHM seems to generate a file called php.conf with this content php.conf would be updated to: # This file was automatically generated by the Cpanel PHP Configuration system # If you wish to change the way PHP is being handled by Apache on your system, # use the /usr/local/cpanel/bin/rebuild_phpconf script or the WHM interface. # # Manual edits of this file will be lost when Apache is updated. # Fastcgi configuration for PHP5 LoadModule fcgid_module modules/mod_fcgid.so MaxRequestsPerProcess 500 AddHandler fcgid-script .php5 .php4 .php .php3 .php2 .phtml FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php5 FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php4 FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php3 FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .php2 FcgidWrapper /usr/local/cpanel/cgi-sys/php5 .phtml # End of autogenerated PHP configuration.
however the path /usr/local/cpanel/cgi-sys/php5 does not exist on my server and now i'm confused because usually "premature end of script headers" is a permissions related issue now i lost track :( suEXEC is enabled maybe that has something todo with it not sure. cat /etc/redhat-release CloudLinux Server release 6.6 (Leonid Kizim) CPanel /Whm 11.46.0
-
Hello :) To confirm, are you accessing an actual domain name when receiving this error and not using an Apache Mod_UserDir URL? Thank you. 0 -
Yes i'm accessing a domain name not a Mod_UserDir url with a ~ in it . 0 -
Hello, The problem seems to be caused by suEXEC and more precise the permissions of the suEXEC binary but if i change them i get errors about httpd.conf syntax jeesus what a nightmare this thing is . suexec -V -D AP_DOC_ROOT="/" -D AP_GID_MIN=100 -D AP_HTTPD_USER="nobody" -D AP_LOG_EXEC="suexec_log" -D AP_SAFE_PATH="" -D AP_UID_MIN=100 -D AP_USERDIR_SUFFIX="public_html"
So the group running suEXEC must have an id that is higher then 100 but if i change it todo that i get httpd.conf syntax errors . Syntax error on line 99 httpd.conf: suEXEC isn't supported; check existence, owner, and file mode of suexec0 -
Hello, Problem solved i forgot to run "cagefsctl --force-update" thanks @Cloudlinux support . 0 -
]Hello, Problem solved i forgot to run "cagefsctl --force-update" thanks @Cloudlinux support .
I am happy to see the issue is now resolved. Thank you for updating us with the outcome.0
Please sign in to leave a comment.
Comments
5 comments