#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Perth Amboy
    Posts
    15
    Rep Power
    0
    Hello,

    I did a standard installation of Apache 1.3.12. Only extra option i added was --prefix="/usr/local/apache"

    Now, i keep trying to run my cgi scripts in Perl, from the cgi-bin/ directory and i keep getting an internal error! I look at my error logs and all i get is :
    [Wed Sep 20 15:07:17 2000] [error] (2)No such file or directory: exec of /usr/local/apache/cgi-bin/test.cgi failed
    Wed Sep 20 15:07:17 2000] [error] [client 192.168.0.101] Premature end of script headers: /usr/local/apache/cgi-bin/test.cgi

    What am i doing wrong? I have Perl installed (v5.something)

    Plesae any help would be most appreciated!

    ------------------
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>[error] (2)No such file or directory: exec of /usr/local/apache/cgi-bin/test.cgi failed

    The first line of your script is neither:

    #!/usr/bin/perl

    Nor

    #!/usr/local/bin/perl
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Perth Amboy
    Posts
    15
    Rep Power
    0
    This is exactly what i have as test.cgi:

    #!/usr/bin/perl

    print "Content-type: text/htmlnn";

    $x="10+20";
    print "$x";

    print "Hello!<br>" x 10;


    anything else that might be wrong?


    ------------------
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>.(2)No such file or directory

    According to (2) error, your first line is incorrect.

    Make sure there is no trailing space nor ^M.

IMN logo majestic logo threadwatch logo seochat tools logo