Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-10-2004, 03:32 PM   #1
LQ Newbie
Registered: Aug 2004
Posts: 23

Rep: Reputation: 15
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 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:-
4- then this message appeared:-
HTTP 500 - Internal server error

here is my CGI code:-
#!/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..
Old 10-11-2004, 03:13 AM   #2
Registered: Nov 2002
Posts: 57

Rep: Reputation: 15
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.
Old 10-11-2004, 12:27 PM   #3
Registered: Sep 2004
Location: Worcester, MA USA
Distribution: Debian, Gentoo, Fedora FC2
Posts: 66

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

and check your apache log files.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl-CGI 500 Error tzarcone Programming 1 07-01-2005 03:45 AM
Additionally, a 500 Internal Server Error error was encountered while trying to use a ukrainet Linux - General 10 06-24-2005 03:23 AM
CGI / Perl Internal Server Error newuser455 Linux - General 10 09-26-2004 03:50 AM
CGI Internal server error newuser455 Linux - General 2 06-10-2004 10:39 PM
dns and 500 internal server error.. Flawless Slackware 4 08-24-2003 12:08 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration