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

    Join Date
    Sep 1999
    Posts
    1
    Rep Power
    0
    Hi, I am running into a very frustating problem. I was running a lot of complicated perl-cgi scripts and they were all working perfectly fine. I had to move to a new server which I set up the other day (Apache 1.3.9).

    I moved all the scripts over and then tried them. They all give me 500 internal error. I checked the log file and it says "premature end of script header"!!

    I checked:
    1. perl path (correct)
    2. Correct header print ("Content-type: text/html")
    3. There is a line after the header print.
    4. Perl is 5.00503

    I even tried a very easy script and it is also giving me the same error.
    #!/usr/bin/perl

    print "Content-type: text/htmlnn";

    print "Hello";

    This runs fine from the command line with no error, but via the web, it's 500 internal error because of "premature end of script"

    I do not think this is the web server problem.(?)
    Please help. Thanks.

    [This message has been edited by vbedceo (edited January 04, 2000).]

    [This message has been edited by vbedceo (edited January 04, 2000).]
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Chicago
    Posts
    6
    Rep Power
    0

    In your original scripts try utilising
    the:
    strict,
    CGI::Carpt qw(fatalsToBrowser), and
    diagnostics perl modules.

    That's all I can say, the script looks
    fine, you may want to comb your httpd.conf
    one more time just to make sure...

    sorry I couldn't be of more help.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Mumbai, Maharashtra, INDIA
    Posts
    4
    Rep Power
    0
    u have done everything very fine

    but u never entered mime type properly

    it is "Content-type: text/html nn"
    don't forget to give "nn" in the end

    I think this should work
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 1999
    Posts
    33
    Rep Power
    16
    If you didn't notice they did remember the nn!

IMN logo majestic logo threadwatch logo seochat tools logo