Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2473

header() not being honored?

From Billy Mays <noway@nohow.com>
Newsgroups comp.lang.php
Subject header() not being honored?
Date 2011-07-08 08:57 -0400
Organization Aioe.org NNTP Server
Message-ID <iv6v01$qou$1@speranza.aioe.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

header() not being honored? Billy Mays <noway@nohow.com> - 2011-07-08 08:57 -0400
  Re: header() not being honored? Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-08 14:11 -0400
  Re: header() not being honored? crankypuss <no@email.thanks> - 2011-07-09 04:25 -0600
  Re: header() not being honored? Andre <pas@pourmois.be> - 2011-07-09 13:03 +0000
    Re: header() not being honored? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-07-10 08:47 +0200
      Re: header() not being honored? Andre <pas@pourmois.be> - 2011-07-10 14:18 +0000

csiph-web