Hi Brent,

there are a few reasons that come to my mind why the code stopped working after transferring from another machine:

1) The shellbang line (e.g. "#!/usr/bin/perl") does not point to the actual perl binary on the local machine.
2) A newline problem, i.e. you binary copied from a unix to dos machine or vice versa.
3) A perl module called from your script is not found


Check the error log again. Usually just before the "Premature end of script... " message, there is a more descriptive warning that might help you to find out why it bailed out.

-Matthias



Brent Clark wrote:

Chris Devers wrote:

Please, just one copy of the email. Thanks.


On Mon, 6 Dec 2004, Brent Clark wrote:


In my apache log files, I keep getting this:
====================================
[Mon Dec  6 17:51:35 2004] [error] [client 192.168.111.214] Premature
end of script headers: /home/abc/cgi-bin/xyz/scripts/agent/logon.pl


If you got that far, then Apache is at least attempting to run the script, so you don't need to keep looking at the Apache config here.

You've provided none of your Perl code, so it's hard to say what exactly the problem might be, but "premature end of script headers" is often a hint that you didn't emit a Content-type header before your other output. The simple fix for this is to have a line like this before any other print statements in your code:

  print "Content-type: text/html\n\n";

But if you're using CGI.pm for content generation, it can do this for you, invisibly, before sending out any output. As it isn't clear how you're sending out your data, I won't get into specifics, but if nothing else try adding the print statement above and see if it helps.

If you're still stuck, please send a short script that demonstrates the problem.


Hi

thanks for your reply

The thing is that I dont get popup box whereby I have to enter the username and password (generated by my a.httaccess of apache).
In terms of the code, this same very code run on my hosted box in the uk and every thing runs fine.
All did was scp the files to my local box, installed apache with libapache-perl etc and it does not want to work. Basically tried to simulate the box in the UK.


Thanks
Brent





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to