Page 1 of 1

CGI with Perl don't work

Posted: 2010/04/24 16:34:42
by GoldErMan
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?

CGI with Perl don't work

Posted: 2010/04/24 23:41:36
by pschaff
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]