Professional Web Applications Themes

CGI: Premature end of script headers - PERL Beginners

I've installed AM Lite on an HP-UX 11.0 system running Apache 2 with PERL 5.8.0. When accessing [url]http://root/cgi-bin/amadmin.pl[/url], I get the following error: Server error! Error message: Premature end of script headers: /opt/apache2/lib/htdocs/cgi-bin/amadmin.pl If you think this is a server error, please contact the webmaster Error 500 I've done the following: 1. Validated that the path to perl is correct. 2. Ensured permissions on the cgi-bin dir and the file are loose enough (755). 3. Run the script from the command line to ensure the PERL binary is accessible by the user www. 3. I've done some other things, but ...

  1. #1

    Default CGI: Premature end of script headers

    I've installed AM Lite on an HP-UX 11.0 system running Apache 2 with PERL
    5.8.0. When accessing [url]http://root/cgi-bin/amadmin.pl[/url], I get the following
    error:

    Server error!
    Error message:
    Premature end of script headers: /opt/apache2/lib/htdocs/cgi-bin/amadmin.pl
    If you think this is a server error, please contact the webmaster
    Error 500

    I've done the following:

    1. Validated that the path to perl is correct.
    2. Ensured permissions on the cgi-bin dir and the file are loose enough
    (755).
    3. Run the script from the command line to ensure the PERL binary is
    accessible by the user www.
    3. I've done some other things, but my brain is fried, as I've been
    looking at this problem most of the day!

    Following are the errors in the Apache error_log:

    syntax error in file amadmin.pl at line 221, next 2 tokens "grep {"
    syntax error in file amadmin.pl at line 224, next 2 tokens "file)"
    syntax error in file amadmin.pl at line 241, next token "}"
    syntax error in file amadmin.pl at line 252, next token "}"
    syntax error in file amadmin.pl at line 275, next token "}"
    syntax error in file amadmin.pl at line 327, next token "}"
    syntax error in file amadmin.pl at line 381, next token "}"
    syntax error in file amadmin.pl at line 389, next 2 tokens "grep {"
    syntax error in file amadmin.pl at line 479, next token "}"
    syntax error in file amadmin.pl at line 485, next 2 tokens "grep {"
    amadmin.pl has too many errors.
    [Wed Jan 14 15:28:14 2004] [error] [client 172.28.6.107] Premature end of
    script headers: /opt/apache2/lib/htdocs/cgi-bin/amadmin.pl

    Since the file is a bit large to post, please see
    [url]http://www.angelfire.com/fl5/davidlt77/index.html[/url].

    By the way, I'm submitting to this newsgroup, rather than the CGI
    newsgroup, because the error is in the PERL code. It bombs at the command
    line--not just from a Web browser.

    Thank you!

    Dave

    Perldiscuss - Perl Newsgroups And Mailing Lists Guest

  2. #2

    Default Re: CGI: Premature end of script headers

    > I've installed AM Lite on an HP-UX 11.0 system running Apache 2 with PERL
    > 5.8.0. When accessing [url]http://root/cgi-bin/amadmin.pl[/url], I get the following
    > error:
    >
    > Server error!
    > Error message:
    > Premature end of script headers:
    /opt/apache2/lib/htdocs/cgi-bin/amadmin.pl
    > If you think this is a server error, please contact the webmaster
    > Error 500
    >
    > I've done the following:
    >
    > 1. Validated that the path to perl is correct.
    > 2. Ensured permissions on the cgi-bin dir and the file are loose enough
    > (755).
    > 3. Run the script from the command line to ensure the PERL binary is
    > accessible by the user www.
    > 3. I've done some other things, but my brain is fried, as I've been
    > looking at this problem most of the day!
    >
    Kudos for not just telling us you had a 500 error.
    > Following are the errors in the Apache error_log:
    >
    > syntax error in file amadmin.pl at line 221, next 2 tokens "grep {"
    > syntax error in file amadmin.pl at line 224, next 2 tokens "file)"
    > syntax error in file amadmin.pl at line 241, next token "}"
    > syntax error in file amadmin.pl at line 252, next token "}"
    > syntax error in file amadmin.pl at line 275, next token "}"
    > syntax error in file amadmin.pl at line 327, next token "}"
    > syntax error in file amadmin.pl at line 381, next token "}"
    > syntax error in file amadmin.pl at line 389, next 2 tokens "grep {"
    > syntax error in file amadmin.pl at line 479, next token "}"
    > syntax error in file amadmin.pl at line 485, next 2 tokens "grep {"
    > amadmin.pl has too many errors.
    > [Wed Jan 14 15:28:14 2004] [error] [client 172.28.6.107] Premature end of
    > script headers: /opt/apache2/lib/htdocs/cgi-bin/amadmin.pl
    >
    > Since the file is a bit large to post, please see
    > [url]http://www.angelfire.com/fl5/davidlt77/index.html[/url].
    >
    > By the way, I'm submitting to this newsgroup, rather than the CGI
    > newsgroup, because the error is in the PERL code. It bombs at the command
    > line--not just from a Web browser.
    >
    I would suggest you talk to the CGI Script Center, as well as taking it
    off the web, unless of course you do have the permission to distribute it:

    "Account
    # Manager LITE may not under any cirstances be sold
    # or redistributed without the written consent of CGI Script Center and
    # its owner Diran Alemshah"

    Do you have said consent?

    [url]http://danconia.org[/url]

    Wiggins D Anconia Guest

Similar Threads

  1. Premature Ending of script headers
    By Autumn-Fox in forum PERL Modules
    Replies: 10
    Last Post: August 19th, 06:02 PM
  2. #14822 [Com]: Premature end of script headers: C:/php/php.exe
    By kurt at k2host dot net in forum PHP Development
    Replies: 3
    Last Post: November 3rd, 04:20 AM
  3. Premature end of script headers: main.php
    By Jason Ho-Ching in forum PHP Development
    Replies: 0
    Last Post: September 18th, 10:16 PM
  4. #25485 [Bgs]: Premature end of script headers: php.exe
    By runtimeterror at kaiundina dot de in forum PHP Development
    Replies: 0
    Last Post: September 11th, 06:30 PM
  5. #25485 [NEW]: Premature end of script headers: php.exe
    By runtimeterror at kaiundina dot de in forum PHP Development
    Replies: 0
    Last Post: September 11th, 09:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139