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

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

 



> -----Original Message-----
> From: uxwrstre [mailto:uxwrstre@xxxxxxxxxxxxx] 
> Sent: Monday, December 04, 2006 3:36 PM
> To: users@xxxxxxxxxxxxxxxx
> Subject: Re:  Mysterious \"Premature end of 
> script headers\" error
> 
> On Friday 01 December 2006 14:05, uxwrstre wrote:
> > ...
> > shows the following: [Fri Dec  1 13:33:43 2006] [error] [client
> > 134.171.16.75] Premature end of script headers:
> > /home/web/archive/docs/bin/http-goto
> 
> Hello everybody,
> 
> I found out the problem!
> The problem was that the CGI-BIN C program worked perfectly 
> in the console but 
> did a segmentation fault while called by apache. It seems that this 
> segmentation fault appears only if apache calls this process. 
> I suppose that 
> the cgi-bin program is buggy.
> It would be good to integreate in apache in the error 
> logfiles on cgi-bin 
> program failure an output in the log files like Signal 11 
> SIGSEGV received or 
> something like that.

If only it were so easy... It's not the apache process that runs the
program - apache forks a new process to run the program. So it's the
forked prog that gets the signal, not apache. Apache is just listening
for output from the program and produces the canonical error message if
it doesn't get a recognisable CGI header.

ScriptLog gives you a bit more information on what's happening and you
can always add more verbose debug to your program if you're really stuck
(eg, have the prog write to it's own log). 

> 
> -- 
> Best regards,
> saf
>
 
 
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