Forum Moderators: phranque

Message Too Old, No Replies

Getting CGI to run

         

jollygoodfella

4:32 pm on Aug 8, 2005 (gmt 0)

10+ Year Member



So I had a guy working for me that was supposed to get our online stores up and running and then he upped and quit, what a jerkface. oh well. i know my fellow comrads here can lend me a wonderful hand, as you have in the past.

So here's my issue. I am trying to get CGI running correctly on our new server, but I keep getting this error:

The server encountered an internal error or misconfiguration and was unable to complete your request. Your administrator may not have enabled CGI access for this directory.

But I do have CGI enabled. We have several servers that are RAQ 550s which all run the same software and have working online stores there. So I guess I am trying to figure out where to go?

All the permissions are the same, the cgi files all work on another server and are the same size, the site# and ownerships are the same too. My only thought is with the httpd.conf file that may not be set correctly. So I downloaded the httpd.conf file from one sever that works fine and copied it to the server I am working on, rebooted and then just got a "connection refused" error. So I copied the backup I made over and rebooted and I am back to where I am now.

I did do a search on google and this does seem to be a pretty widespread error message, so I am hoping to get this resolved quickly:)

Thanks guys and if you need more info please let me know:)

Jolly

jollygoodfella

11:43 pm on Aug 8, 2005 (gmt 0)

10+ Year Member



Anyone?

coopster

2:30 am on Aug 9, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The first place you might want to start is your error_logs. Hit the page again while you tail the access log and error logs to see what your issue might be. Another consideration may be that you have symbolic links to your cgi-bin and the symlinks are not the same as they were on the other server.

jollygoodfella

3:53 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



Ok I sound dumb for asking this, but where are the error logs? i have done a lot of things on the server before, but looking at the logs isn't one of them.

Yes I am using symbolic links and those are going to the correct locations. I copied the path "/home/...../...." and did a "cd /home/...../...." and it went to where they should have.

Help me find the error logs:)

coopster

4:57 pm on Aug 9, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



By default they are in the apache directory ... something like

/usr/local/apache/logs/

The logs themselves are defined in the apache configuration file, as well as where you want them located.

jollygoodfella

5:03 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



hmmm i don't have an "apache" directory. i do have "/usr/local" though and in there are these:

bin
doc
etc
frontpage
games
include
info
lib
majordomo
man
sbin
src
Zend

Any ideas?

jollygoodfella

5:09 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



nevermind i found them:) they were in /etc/httpd/logs. now i'm just looking through the errors.

ChadSEO

5:10 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



If Apache is installed as a package, then the default location of the logs is usually /var/log/httpd/

jollygoodfella

5:10 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



do these help anyone help me?

[Tue Aug 9 11:23:01 2005] [error] [client 69.211.92.116] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:36:02 2005] [error] [client 69.211.92.116] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:43:51 2005] [error] [client 65.245.102.10] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:48:48 2005] [error] [client 69.11.225.253] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:49:06 2005] [error] [client 69.11.225.253] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:49:07 2005] [error] [client 69.11.225.253] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:49:08 2005] [error] [client 69.11.225.253] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:49:08 2005] [error] [client 69.11.225.253] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:49:08 2005] [error] [client 69.11.225.253] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:49:08 2005] [error] [client 69.11.225.253] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:49:08 2005] [error] [client 69.11.225.253] Premature end of script headers: /usr/cgiwrap/cgiwrap
[Tue Aug 9 11:49:10 2005] [error] [client 69.11.225.253] Premature end of script headers: /usr/cgiwrap/cgiwrap

jollygoodfella

5:49 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



I am retarded. I am using WinSCP which is a Secure FTP program and for kicks I checked to see how it handled cgi files. It looks like it DID download it in ASCII. So I over-rode that and downloaded the files in Binary from a working server and reuploaded the files to the new server in Binary and BAM! worked:)

So now I am just checking all the other files to make sure those are correct too:)

jollygoodfella

9:15 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



I should note that using FTP to move files around IS NOT A GOOD IDEA. I should have just tarred up the entire folder structure and then move that over and untarr it in the new location, that would have kept all the permissions and everything. Thanks for your help fellas:) You got me going in the right direction:)

Jioffri

1:11 am on Aug 14, 2005 (gmt 0)

10+ Year Member



Fella,

There are some ftp progs out there that will automatically identify and upload your files as per their original format. If you email me I can suggest at least one good free ftp prog that is just as good as the commercial ones out there like the one you are using.

Jio

jollygoodfella

3:57 pm on Aug 15, 2005 (gmt 0)

10+ Year Member



Thanks Jioffri. Tarring up files are faster to move around anyhow, so I think for now I am going to stick with that:)