Premature end of script headers

Premature end of script headers

Posted by: Braunson
Posted on: 2009-02-04 13:18:00

Hello,

I'm trying to run two simple PHP scripts that are for a secret project but anyway. I run one file (parser.php) and I get a 500 Internal Error via HTML, so I look up my error log via FTP and this is what appears.

[Wed Feb 04 13:11:12 2009] [error] [client 0.0.0.0] Premature end of script headers: parser.php

I'm not posting all of my script for security reasons and the client asked me not to. But any help is appreciated.

Re: Premature end of script headers

Posted by: Atropos7
Posted on: 2009-02-04 14:49:00

In reply to:

I'm not posting all of my script for security reasons and the client asked me not to. But any help is appreciated.


The web server expects the output to begin with a set of HTTP headers. Apparently your script has a bug and something besides HTTP headers appears at the beginning of the output. It could be a warning or error message or getting something out of order.

Try running it from a command line in shell, or making she the first line of the file is
<?php header('Content-Type: text/plan'); echo "Debug mode on\n" ?>


cool openvein.org -//-

Re: Premature end of script headers

Posted by: Braunson
Posted on: 2009-02-04 15:27:00

I've added that and instead of the 505 error at the end of the text, i get this at the end..

":URMo0 Wp=gQVhۚ+֏ÎD$1 NȧGG6~t/>k랴v%sh{kUcĻ1cyGf?Tl8_ښ,jNmg3E 0pBF^: 9Gm81Gˡ F`w0?9RdJni.w
(6s\)P1
Dׅ~.jÁ04_CEJU<I
G(mG#`L0rP4Ԁ9nL_9ҵU}ϹZrxF!ʆ8JM+@x< <9jW?Nbl:NUNqt[-S7E[ zރuq_s"

And it's not even finished running the script..

"good link! (rapidshare.com/files/94318513/PoolVideoDVD1.part20.rar) [text: PoolVideoDVD1 part20]
20(t) :: 0(d)
26 : inetlive.ru/2007/12/22/va-100-rb-classics/
good link! (rapidshare.com/files/78200142/100-RandB-Classics-5CD_Epidem.ru.part1.rar) [text: 100 RandB Classics 5CD Epidem ru part1]
good link! (rapidshare.com/files/78204547/100-RandB-Classics-5CD_Epidem.ru.part2.rar) [text: 100 RandB Classics 5CD Epidem ru part2]
good link! (rapidshare.com/files/78209208/100-RandB-Classics-5CD_Epidem.ru.part3.rar) [text: 100 RandB Classics 5CD Epidem ru part3]
good link! (rapidshare.com/files/78213391/100-RandB-Classics-5CD_Epidem.ru.part4.rar) [text: 100 RandB Classics 5CD Epidem ru part4]
good link! (rapidshare.com/files/78217454/100-RandB-Classics-5CD_Epidem.ru.part5.rar) [text:URMo0 Wp=gQVhۚ+֏ÎD$1 NȧGG6~t/>k랴v%sh{kUcĻ1cyGf?Tl8_ښ,jNmg3E 0pBF^: 9Gm81Gˡ F`w0?9RdJni.w
(6s\)P1
Dׅ~.jÁ04_CEJU<I
G(mG#`L0rP4Ԁ9nL_9ҵU}ϹZrxF!ʆ8JM+@x< <9jW?Nbl:NUNqt[-S7E[ zރuq_s"



Re: Premature end of script headers

Posted by: pangea33
Posted on: 2009-02-04 18:44:00

That error message suggests copyrighted material being uploaded to a file sharing site. Your best bet might be Google because you may not get a ton of feedback here.

Re: Premature end of script headers

Posted by: Braunson
Posted on: 2009-02-04 19:06:00

It might suggest that, but I am simple searching for those links, not uploading them or dealing with the actual file.

I still recieve this error. Again, any help is appreciated.

Re: Premature end of script headers

Posted by: misterhaan
Posted on: 2009-02-05 10:59:00

if the script takes too long to run, it gets killed and you can see this sort of message.

track7 - my dream-hosted site

Re: Premature end of script headers

Posted by: Braunson
Posted on: 2009-02-06 05:59:00

Hmm, what would be the best way to extend that time, via PHP.INI? I am using a "set_time_limit(10000);
ignore_user_abort(true);" in the script but even if I change that, it dosn't do really anything.

Re: Premature end of script headers

Posted by: misterhaan
Posted on: 2009-02-06 07:54:00

i don't think you can extend the time limit, and i'm pretty sure it's done outside of php anyway. your only option is to make your scripts run faster or do less. i sped up a script that was doing a lot of mysql queries by using php's mysql functions directly instead of going through PEAR::DB. a different script i put a limit on so it would only handle 100 records at a time and then i'd have to run it again to get the next 100.

when i saw this most recently and contacted support (i hadn't changed my scripts at all but had been moved to a new server) they didn't see any evidence that my scripts were getting killed. best i can tell there was something wrong with apache and my scripts would sometimes wait on a zombie apache process and never finish.

track7 - my dream-hosted site

Tags: php scriptsinternal errorsecurity reasons