Premature end of script headers

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.

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

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

“:‹URMoÛ0½ëWp=gQVôhÛš+֏¼ÃŽ´ÍD$1“¨þ÷“ì ëN’ȧG¾G6Ÿ¶ïÝïý~t¯/°ÿõýåùî>ký¼ëž´ÞvÛ%s¿Þh½{»kUcÄ»¶1„cyˆGíýfï?½¼T£çlÓó8Õ_Úš,‡jNmgÅ3E 0pB‘FÀ¶^: 9Gåm8ì1GË¡ F¸‚°wÂ0°?9Rç‘þdJ²nôi.¶w„‰ (ò¯6ŽÞ›¤s\)¸Pï1•¾ ºD×…~.jÁ£¯ø0‰õ4_®íCŽEÉJU<†IŒ G(m·G#ðL0r¨ŸPÀã4‡Ô€9nL·æ_9ÒµðU}ϹŠ°éZ³rôxFëª!ʆããòÛ8ÚJ…ÎM+@xØ<À<•9ŒjÁW?Næblµ:NUNq¼t[§µ«à-ÙS7E·[ù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:‹URMoÛ0½ëWp=gQVôhÛš+֏¼ÃŽ´ÍD$1“¨þ÷“ì ëN’ȧG¾G6Ÿ¶ïÝïý~t¯/°ÿõýåùî>ký¼ëž´ÞvÛ%s¿Þh½{»kUcÄ»¶1„cyˆGíýfï?½¼T£çlÓó8Õ_Úš,‡jNmgÅ3E 0pB‘FÀ¶^: 9Gåm8ì1GË¡ F¸‚°wÂ0°?9Rç‘þdJ²nôi.¶w„‰ (ò¯6ŽÞ›¤s\)¸Pï1•¾ ºD×…~.jÁ£¯ø0‰õ4_®íCŽEÉJU<†IŒ G(m·G#ðL0r¨ŸPÀã4‡Ô€9nL·æ_9ÒµðU}ϹŠ°éZ³rôxFëª!ʆããòÛ8ÚJ…ÎM+@xØ<À<•9ŒjÁW?Næblµ:NUNq¼t[§µ«à-ÙS7E·[ùzÞƒ²uqÔ_¬žƒs”

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.

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.

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

track7 - my dream-hosted site

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.

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