FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » header() not being honored?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: header() not being honored? [message #174793 is a reply to message #174792] Fri, 08 July 2011 18:11 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 7/8/2011 8:57 AM, Billy Mays wrote:
> I am trying to have php output previously gzipped data, but it seems
> like php is ignoring the call altogether.
>
> Code:
>
> #######################################
> /* Trying to prevent the chunked encoding */
> header('Content-Length: ' . filesize($file) );
> header('Content-Encoding: gzip');
>
> readfile($file);
>
> echo "anything";
>
> die();
> ########################################
>
> It seems that the first call header get completely ignored (I watched
> the headers with telnet) and after the readfile() call the the echo is
> never used.
>
> Am I misunderstanding how to use the header function? Is there another
> way to see whats going on? Unfortunately, I'm in a shared hosting
> environment, PHP: 4.4.9
>
> --
> Bill

I don't think you can prevent chunking in HTTP 1.1. You would have to
send as HTTP 1.0, which would require a configuration change in the web
server.

And I would suggest you change your hosting immediately. PHP 4.x has
been out of service for years, and if your hosting company is still
running it, I would be afraid of what other old software they're running.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: about quality of SAP training videos
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 20:01:57 GMT 2024

Total time taken to generate the page: 0.07578 seconds