Click to See Complete Forum and Search --> : cgi-bin help


Inferno
10-15-2000, 02:31 PM
Evyery time I go to run a script I get this error. It does this for all scripts .cgi and .pl
-------------------------------------------
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, grahamc@telusvelocity.net and inform them of the time the error occurred, and anything you might
have done that may have caused the error.

More information about this error may be available in the server error log.


Apache/1.3.12 Server at Port 80
-----------------------------------------

I took a look through my httpd.conf file and everything looks like it is setup right.

I am running RH7.0 if that helps.

Muzzafarath
10-15-2000, 03:03 PM
Are the scripts chmodded to 777? Do they start with a print "Contenty-type: text/html\n\n" (the two \n\n's are important)? Is the first line of the script correct (it should be something like #!/path/to/interpretor)?

Inferno
10-15-2000, 04:49 PM
Yes they are chmodded to 777. I do not know how to program perl so the script i am using is off the net. I got it form http://www.reedmedia.net/projects/systemstatus/ so if you would not mind testing it out a tell me if it works. I checked and I do have perl installed and perl is setup in the httpd.conf.

takshaka
10-15-2000, 07:29 PM
More information about this error may be available in the server error log.

And without that information we can only throw out wild guesses, though I suspect--as Muzza mentioned--the shebang line is probably wrong. Should probably be '#!/usr/bin/perl' for RH.

btw--no one but the owner needs write permissions to a CGI script. 777 is a Bad Thing.

Harvey
10-15-2000, 07:59 PM
You might have some syntax errors in your scripts as well.

Try running the scripts on the command line to see if they give you any errors there.

[This message has been edited by Harvey (edited 15 October 2000).]

Incision
10-16-2000, 01:50 AM
You may need to run DOS2UNIX application
on the each script.

you can obtain this at freshmeat.net

freddieB
10-16-2000, 12:50 PM
Also make sure your web server allows you to run CGi scripts. Some do not by default.