Forum Moderators: coopster

Message Too Old, No Replies

premature end of script headers: php4

Seemingly random occurrence of this common PHP issue

         

jshare

3:22 pm on Mar 28, 2007 (gmt 0)

10+ Year Member



I'm running WPMU 1.1.1 on PHP4.4.4-6 on the MediaTemple GridServer. Ever since my I first installed WPMU 1.0 about 5 months ago, the above 'Premature' error message would occasionally find its way into my error_log but I couldn't reproduce it. This before any plugins were installed, so I don't blame any of them although they may have aggravated things. Recently, the error has begun appearing in the logs alot more as my traffic has risen (or tries to).

The error usually appears as 'Premature end of script headers: PHP4' but rarely there is also a referrer although there seems to be no pattern among the referrers.

After googling this forum and others, I have tried a few suggestions:

1. Ensuring that all my directories have execute permissions. Done.

2. Ensuring that all my files have Unix-style endline characters. In Eclipse, I have now set this as the default and I checked that the setting cascaded through my source tree but the files aren't showing any differences via Subclipse so I'm thinking that this change had no effect.

Any suggestions? Perhaps on how to debug this?

Have any other MediaTemple users been seeing this with WPMU or other apps?

Thanks in advance

eelixduppy

2:14 am on Mar 29, 2007 (gmt 0)



Welcome, jshare.

I'm not exactly sure what error this is. There seems to be some sort of corruption with your headers? Is this the entire error that you are receiving? If not, can you please post the whole error and if it references a line number, can you please post that line of the code. This will help give us a better understanding of what's actually going on. I'm wondering if this error is even coming from PHP...

jshare

11:45 am on Mar 29, 2007 (gmt 0)

10+ Year Member



eelixduppy, this is a typical line copied from my error_log:

[Wed Mar 28 10:07:10 2007] [error] [client #*$!.#*$!.#*$!.#*$!] Premature end of script headers: php4

Of course, I've edited the user's IP address. Otherwise, that's it.

Would you know where and how I can change the format of the error_log so that I can have more debugging information?

jshare

3:08 pm on Mar 29, 2007 (gmt 0)

10+ Year Member



MediaTemple has contacted me to announce that they made some changes on the GridServer and that I should no longer be seeing these errors. And it's true, the last one appeared over 10 hours ago - the longest errorless gap I've had in weeks. I'll be watching for a regression, however.

I'm still curious to know if it's possible to change the error_log format and how.

coopster

3:45 pm on Mar 29, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You can start here for PHP Error Handling and Logging Functions [php.net].

jshare

3:49 pm on Mar 29, 2007 (gmt 0)

10+ Year Member



Thanks coopster