RE: Mysterious \"Premature end of script headers\" error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try replacing the "Location"  with the more usual;

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

NB - two returns after the header text

Then some basic content, eg, "it works!"

what happens?

If it still gives problems, you need to look at switching on ScriptLog
(see docs for details).

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> -----Original Message-----
> From: uxwrstre [mailto:uxwrstre@xxxxxxxxxxxxx] 
> Sent: Monday, December 04, 2006 11:25 AM
> To: users@xxxxxxxxxxxxxxxx
> Subject: Re:  Mysterious \"Premature end of 
> script headers\" error
> 
> On Friday 01 December 2006 14:15, Robert Fox wrote:
> > What is the script written in? Can you run the script from 
> the command
> > line?
> >
> > Usually, this means that the script is not sending out a 
> completely formed
> > HTTP header, which can happen for a variety of reasons.
> 
> The script is written in C.
> 
> Here is an output:
> > ps -elf | grep httpd
>  8 S     http   394   388  0  41 20 70b8e758    556 704bde8c  
>  Aug 07 ?        
> 0:00 /home/web/server/apache/bin/httpd -
>  8 S     root   388     1  0  40 20 70bde038    473 70befbea  
>  Aug 07 ?        
> 0:08 /home/web/server/apache/bin/httpd -
>  8 S     http   395   388  0  41 20 70c8b5b8    556 7006e26c  
>  Aug 07 ?        
> 0:00 /home/web/server/apache/bin/httpd -
>  8 S     http   397   388  0  45 20 70c8a768    473 7049737c  
>  Aug 07 ?        
> 0:00 /home/web/server/apache/bin/httpd -
>  8 S     http   398   388  0  74 20 70c8a040    473 7006e4ec  
>  Aug 07 ?        
> 0:00 /home/web/server/apache/bin/httpd -
>  8 S     http   399   388  0  84 20 70c795c0    473 7006e8ac  
>  Aug 07 ?        
> 0:00 /home/web/server/apache/bin/httpd -
>  8 S     http 26963 26952  0  51 20 70e6aeb8    120 704a735c 
> 11:23:26 pts/4    
> 0:00 grep httpd
>  8 S     http 27676   388  0  40 20 70e4f5f8    475 704bcd0c  
>  Jun 23 ?        
> 0:00 /home/web/server/apache/bin/httpd -
> > 
> 
> > id
> uid=30005(http) gid=30010(websys)
> > env
> ...
> GATEWAY_INTERFACE=CGI/1.1
> QUERY_STRING=tools=%2FDICB&x=8&y=3
> REMOTE_ADDR=127.0.0.1
> REMOTE_HOST=acmp5.hq.lan
> REQUEST_METHOD=GET
> SCRIPT_NAME=/bin/http-goto2
> SERVER_NAME=acwebint.lan
> SERVER_PORT=80
> SERVER_PROTOCOL=HTTP/1.1
> SERVER_SOFTWARE=Apache/1.3.37 (Unix) mod_jk/1.2.0 
> mod_perl/1.29 PHP/4.3.0 
> mod_ssl/2.8.28 OpenSSL/0.9.8
> > ./http-goto
> Location: http://acwebint/DICB
> 
> > 
> 
> And this produces error 500:
> [Mon Dec  4 11:24:33 2006] [error] [client 127.0.0.1] 
> Premature end of script 
> headers: /home/web/archive/docs/bin/http-goto
> 
> This is really strange.
> 
> -- 
> Best regards,
> saf
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux