LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   HELP! CGI problem : HTTP 500 - Internal server error (http://www.linuxquestions.org/questions/programming-9/help-cgi-problem-http-500-internal-server-error-241054/)

eech55 10-10-2004 02:32 PM

HELP! CGI problem : HTTP 500 - Internal server error
 
hi all

when I tried to view my cgi test web site on the browser, it said: HTTP 500 - Internal server error





here is the story in more detail...>>




I have FreeBSD with IP of 10.0.0.1/8 and Apache2 installed on.

this is my 1st try to do some works on CGI.



here is what i did:-


1- i put my simple CGI script in /usr/local/apache/cgi-bin
2- then i run apache2
3- then i went to my workstation which is in the same LAN and i typed the following:-
Code:

http://10.0.0.1/cgi-bin/my_first_cgi.cgi
4- then this message appeared:-
Code:

HTTP 500 - Internal server error


here is my CGI code:-
Quote:

#!/usr/bin/perl -wT
print "Content-type: text/html\n\n";
print "Hello, world!\n";

NOTE: i didnt do any configuration to httpd.conf
this is my first CGI and I dont know whether if I have to configure httpd.conf or not, please tell me what should I do



waiting for answers..

onnyloh 10-11-2004 02:13 AM

have u set your script to have execute mod?

if not, set it:
chmod a+x my_first_cgi.cgi

besure your line seperator is unix type.
if not, change it with dos2unix.

dizzutch 10-11-2004 11:27 AM

try this: Content-Type:text/html;charset=iso-8859-1

and check your apache log files.


All times are GMT -5. The time now is 06:22 PM.