CGI with Perl don't work

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
GoldErMan
Posts: 4
Joined: 2010/02/25 16:48:32

CGI with Perl don't work

Post by GoldErMan » 2010/04/24 16:34:42

hi,

i'm a CentOS and Linux beginner. i've started learning CGI with Perl and i can't get it to work.
i wrote a simple "hello world" file, stored it in the /var/www/CGI-bin and set CGI-bin permissions to 755,
still get "Internal Server Error".

code:

#/usr/bin/perl -w

use 5.010;
use CGI::Carp qw(fatalsToBrowser);

print "content-type: text/html\n\n";
print "hello";


httpd error_log:

"(8)Exec format error: 'exec of /var/www/cgi-bin/hello.cgi'
"Premature end of file"


can someone help me with it?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

CGI with Perl don't work

Post by pschaff » 2010/04/24 23:41:36

Google can help[code]
cgi ~howto OR ~tutorial
cgi ~howto centos4 OR rhel4 OR "red hat enterprise linux 4"
cgi ~tutorial centos4 OR rhel4 OR "red hat enterprise linux 4"
[/code]

Post Reply

Return to “CentOS 4 - Server Support”