RE: [users@httpd] Sometimes getting 'Premature end of script...'

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

 



> -----Original Message-----
> From: Lllllll Gabor [mailto:problem2@xxxxxxxxxxx]
> Sent: Mittwoch, 27. Juli 2005 23:11
> To: users@xxxxxxxxxxxxxxxx
> Subject: [users@httpd] Sometimes getting 'Premature end of script...'
> 
> 
> Can someone help me to solve this?
> 
> Usually when I browse my php scripts they are fine.
> But sometimes I get an 500 (internal server) error because
> of 'Premature end of script headers: php.exe'.

This means that the PHP code failed before it got to the bit where it prints the response header ("content-type: text/html\n\n"). There is an occasional problem with your code which is not properly trapped. Do you access a DB?, write to a file? read from a file? do any calculations using user input? Any of these (and others) can cause a failure which depends on user input. To debug:

- Look in the access log and find the request which corresponds to the error (use the timestamp to cross-reference). Try to reproduce the fauilure by re-issuing the same request (ie, same user parameters).
- If you need more information, activate ScriptLogging - see docs for details
- Generally, don't trust user input - they can submit anything (words instead of numbers, numbers instead of words, even entire programs!)

> 
> I read the faq but found only a few things about this.
> 
> How can I make it to work always?

You have to fix the bug in the PHP code.

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

> I use these:
>   Apache 2.0.48
>   Win XP
>   Php 4.3.5
> 
> I already increased the "ThreadsPerChild" setting. Now it is 
> better but
> not perfect.
> I also have the following settings in httpd.conf:
> ScriptAlias /php/ "d:/Apache2/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php.exe"
> 
> I would be happy about any ideas or comments about this.
> 
> Thanks,
>   Gabor
> 
> 
> 
> ______________________________________________________________
> _________
> [freemail] extra 1GB-os postafiókkal, Önnek már van? 
http://freemail.hu



---------------------------------------------------------------------
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

Diese E-mail ist eine private und persönliche Kommunikation. Sie hat keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This e-mail is of a private and personal nature. It is not related to the exchange or business activities of the SWX Group. Le présent e-mail est un message privé et personnel, sans rapport avec l'activité boursičre du Groupe SWX.
 
 
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