Wont run perl scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ratcateme
    New Member
    • Nov 2007
    • 11

    Wont run perl scripts

    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

    Code:
    #!/usr/bin/perl
    
    print "Content-type: text/html\n\n";
    print "<html><body><h1>Hello World</h1></body></html>\n";
    i installed the php5-cgi package and ran this script in the same directory

    Code:
    #!/usr/bin/php5-cgi
    <?php
    header("Content-type: text/html");
    echo "Hello, World.";
    
    exit;
    ?>
    it worked fine can you please help

    Thanks Scott.
Working...