These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for fcgid and cgi on centos 6.4 on the new forum.
Hi there, I'm struggling to get fcgi or cgi working on a 1G vps with centos 6.4. I am in a situation where cpanel was once installed, but I've removed it and it seems ok. VPS provider doesnt seem to want to do a os reinstall, so im sort of stuck in this situation for now.
I've read through all the threads I could find and tried them all, but to no avail.
The funny thing is my logs are somewhat clean for suexec.
httpd error log:
[Sat Jul 13 08:22:36 2013] [warn] [client xxx.xxx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sat Jul 13 08:22:36 2013] [error] [client xxx.xxx] Premature end of script headers: index.php
suexec.log
[2013-07-13 08:22:36]: uid: (505/xxx) gid: (505/xxx) cmd: php5.fcgi
suexec info
root@server [/usr/sbin]# suexec -V
-D AP_DOC_ROOT="/home"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/var/log/httpd/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=500
-D AP_USERDIR_SUFFIX="public_html"
root@server [/usr/sbin]# stat -c %a suexec
4510
root@server [/usr/sbin]# ls -al suexec
-r-s--x--- 1 root apache 29520 May 17 22:43 suexec*
root@server [/usr/sbin]#
Any help or direction would be appreciated
Thanks
Howdy,
The suexec information all looks good... but that Apache error doesn't :-)
If you change the PHP Execution Mode to CGI, what error(s) do you receive in the Apache log at that point?
-Eric
Thanks Eric, here is the output:
[Tue Jul 16 12:45:50 2013] [error] [client xxx.xxx] Premature end of script headers: php5.cgi
Nuts! I was hoping for a more descriptive error message :-)
What happens if you create a new PHP script named "test.php", and for it's comments, add the following line:
<div class="codeblock"><pre><code><span style="color: #000000"><span style="color: #0000BB"><?php<br /> phpinfo</span><span style="color: #007700">(); <br /></span><span style="color: #0000BB">?></span></span></code></pre></div>
If you access that test.php script in your browser, do you receive the PHP info output? Or does it throw that same error you've been getting?
-Eric