I am using apache 2.2.4 and perl 5.8.8 on Ubuntu 7.10
I am creating a website mainly in PHP but i have a few perl scripts i want to run. I am running a simple script but get this error a Internal Server Error 500 the apache error.log file says:
[Fri Dec 14 14:59:52 2007] [error] [client 10.1.1.5] (2)No such file or directory: exec of '/var/www/cgi-bin/test.cgi' failed
[Fri Dec 14 14:59:52 2007] [error] [client 10.1.1.5] Premature end of script headers: test.cgi
this is the script
i installed the php5-cgi package and ran this script in the same directory
it worked fine can you please help
Thanks Scott.
I am creating a website mainly in PHP but i have a few perl scripts i want to run. I am running a simple script but get this error a Internal Server Error 500 the apache error.log file says:
[Fri Dec 14 14:59:52 2007] [error] [client 10.1.1.5] (2)No such file or directory: exec of '/var/www/cgi-bin/test.cgi' failed
[Fri Dec 14 14:59:52 2007] [error] [client 10.1.1.5] Premature end of script headers: test.cgi
this is the script
Code:
#!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html><body><h1>Hello World</h1></body></html>\n";
Code:
#!/usr/bin/php5-cgi
<?php
header("Content-type: text/html");
echo "Hello, World.";
exit;
?>
Thanks Scott.