Re: Premature end of script headers

by "Bill Pierson" <wpierson(at)tampabay.rr.com>

 Date:  Tue, 19 Sep 2000 14:27:21 -0400
 To:  "Mary Alward" <maryalward(at)earthlink.net>
 Cc:  <hwg-languages(at)hwg.org>
 References:  oemcomputer
  todo: View Thread, Original
Mary,
I've found that in some instances, the web server / PERL configurations can
vary from computer to computer, spanning OS and web server software. You may
have to include:
print "Content-type: text/html\n\n";
either in the very beginning of the program, or directly before information
is output to the browser.

Also - do you have the ability to test the program from a telnet prompt? For
example, if I create a PERL program, I'll run it directly from the command
line to check for any problems.
./test.pl
If it comes back with any output or errors, that means that the browser is
getting force fed these output or errors without the proper header being
introduced first, as mentioned above. If the first line that is shown is
Content-type: text/html\n\n

I know that it will work properly in the browser.

Hope this helps,
--Bill Pierson




----- Original Message -----
From: "Mary Alward" <maryalward(at)earthlink.net>
To: <hwg-languages(at)hwg.org>
Sent: Tuesday, September 19, 2000 12:47 PM
Subject: Premature end of script headers


Hello,
I have had a couple of times where I get the error "Premature end of script
headers" when I submit a form.  Once, I copied a working Perl program from
one Unix site to another and it failed on the 2nd site.  Just now, I have a
working perl program which worked on a non-SSL URL.  I just changed the URL
to be "https...." and I get the following error.  My editor (Perl Builder)
finds no errors.

Any advice would be welcome.
Mary Alward
www.iWebTown.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA