|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-16 20:57 UTC] iliaa@php.net
[2003-10-17 04:53 UTC] cysgwr_eryri at yahoo dot co dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 04:00:01 2025 UTC |
Description: ------------ Hello. I'm not sure whether this is a bug or a configuration error, but it has me stumped. I've searched the bugs and can't quite find anything exactly the same. Ironically, a number of people have complained about 'Location: ' not working, but it works perfectly here, and that's not what my problem is. Operating system is Mandrake 9.1. Web Server is Apache 1.38 with php 4.3.3 (problem occurs whether either statically compiled-in or as dynamic .so using apxs), with mod_perl 1.28 as a dynamic .so under apxs (problem occurs whether this is loaded or not). Problem occurs whether using php.ini-dist or a customised version. All ingredients compiled from source. I was trying to change some of the headers. The production code is massive and unwieldy, but managed to display the same symptoms with code reproduced below. In short: On a normal request the server reponds as follows: HTTP/1.1 200 OK Date: Thu, 16 Oct 2003 15:44:22 GMT Server: Apache/1.3.28 (Unix) mod_perl/1.28 PHP/4.3.3 X-Powered-By: PHP/4.3.3 Connection: close Content-Type: text/html However, trying to change *any* of the headers that are already present fails. This fails whether you specify the boolean 'append' value or not (if not, nothing is changed, if you specify 'appended', nothing is added). Adding other headers works perfectly fine, but trying to change those already present does not. Using the code provided the server returns this: HTTP/1.1 200 OK Date: Thu, 16 Oct 2003 16:07:54 GMT Server: Apache/1.3.28 (Unix) mod_perl/1.28 PHP/4.3.3 X-Powered-By: PHP/4.3.3 Foo: Bar Monkey: Nuts Connection: close Content-Type: text/html The new headers are added perfectly correctly, but the old ones are not altered at all. Is is just that these two headers are unalterable, is this a bug, or could it be a configuration issue? Reproduce code: --------------- <?php //change headers (older date, different server) header('Server: Monkey/1.0'); header('Date: Mon, 18 Nov 2002 11:24:52 GMT'); //add other headers for testing... header("Foo: Bar"); header("Monkey: Nuts"); ?>