You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Joe Lazaro <jl...@solution-soft.com> on 1999/08/18 18:26:30 UTC

documentation/4875: Premature end of script headers

>Number:         4875
>Category:       documentation
>Synopsis:       Premature end of script headers
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          support
>Submitter-Id:   apache
>Arrival-Date:   Wed Aug 18 09:30:00 PDT 1999
>Last-Modified:
>Originator:     jlazaro@solution-soft.com
>Organization:
apache
>Release:        1.3.6 (Win32)
>Environment:
Windows NT Workstation 4.0 SP5
>Description:
I was trying to run a simple hello world cgi script that I copied out of the
O'Reily Learning Perl book (pg. 184) and when I ran it I was getting an Internal
Server error and the following line in my error.log:
---
[Wed Aug 18 09:07:32 1999] [error] [client xxx.xx.xx.xxx] Premature end of
script headers: d:/webpage/cgi-bin/hello.cgi
---
>How-To-Repeat:
see fix
>Fix:
I made a subtle error in copying the example from the book. The book has this
line:
  print <<END_of_Multiline_Text;
but I had put a space (out of habit) after the << so it looked like this:
  print << END_of_Multiline_Text;

When I removed the space it worked perfectly! I'll bet this has happened to
other people besides me, so it might be worth putting on the FAQ under this
subject heading.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]