• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

cgi-bin works on one site and no more

S

Sins

Guest
I have two RedHat 9 boxes with Plesk 7.5 on them. Some of my clients were wanting to use a cgi guestbook script. I set it up on one site on one of the boxes and it worked great. Then I went to install it on another site and keep getting the 500 error. I thought it strange so I tried it on my other box on a site. It installed and ran fine. I then went to install it on another site on that box and it wouldn't work. It only lets me install it on one site on each box and then doesn't work. On yet another box I have that doesn't have Plesk, I can install it as many times as I want to. In the statistics/logs/error for the site I am getting.

Premature end of script headers: setup.cgi
failed to open log file /var/log/httpd/suexec_log
fopen: Permission denied

The suexec file is owned by root with group being apache and chmod is 664. When opening it I find:

uid: (10003/siteowner) gid: (10001/10001) cmd: setup.cgi

As far as the script, I am setting the permissions and ownership right. I have spent the last three days reading everything in this forum having to do with cgi and fopen that I could find doing anything in any of them does not help. What is really stumping me is that it will work on one site...but only one and none of the others. I have also checked the httpd.conf and includes and the site it is running on has the same configuration as the ones that it won't run on.

Thanks in advance.....
 
All cgi Scripts

just to make it clear, it doesn't just do this with this one script, I can't get any other cgi script to work ecept the once I first install on the server. I have tried as a second cgi script several that I know work and they will not run and give the same error.
 
cgi problem

For some reason, the code of the cgi text was being messed up. I was ftp'ing it in ASCII from a windows machine. by cd'ing to the directory of my cgi scripts, then running: perl -pi -e 's/\015$//' *.cgi You have to do this with ALL of the cgi scipts. After that they ran like a charm for me. I think it is something wrong with alot of cgi scripts, or plesk does something weird to them, I am not sure. But after doing the above, I can now run any script.
 
Back
Top