View Full Version : CGI Error
jyeung
30th July 2003, 09:46 PM
Ever since I upgraded to PSA 6, CGI errors started springing up for whatever reason.
Anyway, all CGI files return a 500 Internal Server Error.
The error_log says it's a premature end of script, but it is highly improbable considering it has been running fine before the upgrade.
In suexec_log, it reads:
[2003-07-30 21:35:21]: info: (target/actual) uid: (dxforums/dxforums) gid: (psacln/psacln) cmd: hello.cgi
[2003-07-30 21:35:21]: error: command not in docroot (/home/httpd/vhosts/xxxxxxxxxxxx.com/cgi-bin/hello.cgi)
Any idea on how to fix this?
Thanks!
GWDGuy
31st July 2003, 10:58 AM
Just guessing here but did you change from standard to RPM version of PSA? Are you sure the paths are set correctly in your scripts to what the upgrade pathes are.
Did you try adding a -w to the end of the perl path in the script and see if that helps.
Robert
jyeung
31st July 2003, 06:17 PM
No, but it was a *really* bad upgrade. The server crashed while upgrading from 5 to 6. It took me 3 days to get the server ready again :|.
memory
3rd August 2003, 11:53 AM
If your still having trouble add this to your httpd.conf file
AddHandler cgi-script .pl
AddHandler cgi-script .cgi
This will also allow scripts to be ran outside of the cgi-bin directory.
utman
5th January 2004, 07:34 PM
the problem is that suexec thinks the scripts should run as psacln when in reality they are actually set to psaserv.
stephen
6th January 2004, 02:25 PM
Then how do we fix this, we cant give customers the ability to change ownership but they shouldnt have to wait for tech to manually change the ownersgroup from psaserv to psacln. This is an issue and i am not sure what to do.
hardweb
6th January 2004, 04:08 PM
stephen, in what directory you have files with psaserv ownership?
stephen
6th January 2004, 04:37 PM
domain.com/cgi-bin/ any file that a customer uploads is uploaded as psaserv and not psacln.
hardweb
6th January 2004, 04:58 PM
Do you have psaserv group on the cgi-bin directory?
stephen
6th January 2004, 05:28 PM
When one of the last upgrades occurred it changed the group ownership of most of the directories to psaserv including cgi-bin. httpdocs has the same group but uploaded files are made psacln.
hostcorp
7th January 2004, 02:48 AM
It looks like your suexec has been replaced during the apache upgrade - restore the psa modified version with:
cp -a /usr/sbin/psa-suexec /usr/sbin/suexec
stephen
7th January 2004, 07:12 PM
We are running Freebsd not Redhat.
hostcorp
7th January 2004, 09:22 PM
Originally posted by stephen
We are running Freebsd not Redhat.
Are you jyeung? That's who I was talking to - the error messages in suexec_log lead me to believe the suexec binary has been overwritten.
vBulletin® v3.6.12, Copyright ©2000-2008, Jelsoft Enterprises Ltd.