|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-05 13:29 UTC] ernest at vogelsinger dot at
From the docs:
The optional "replace" parameter indicates whether the header should replace a previous similar header, or add a second header of the same type. By default it will replace, but if you pass in FALSE as the second argument you can force multiple headers of the same type.
At least with PHP 4.1.1/Win32(XP), this is NOT true - headers are always added up.
Using this little test:
<?php
header('X-Test-Header: Version 1');
header('X-Test-Header: Version 2');
?>
this output is created:
-------------------------------------
php headers.php
X-Powered-By: PHP/4.1.1
X-Test-Header: Version 1
X-Test-Header: Version 2
Content-type: text/html
-------------------------------------
According to the docs, only "Version 2" of the header should be sent. The results are identical if you do not provide the "replace" parameter, or if you set it to true or false.
This is a very annoying bug, and for my application I'd rate it "critical".
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 02:00:01 2025 UTC |
<?php $user = crypt($usuario); $password = md5($clave); if (($usuario == "OSN") && ($clave == "misvr")) { header ("Location: http://24.232.112.10/<b>crypt(guestprivado3.php)</b>?Usuario=$userClave=$password"); } else { header ("Location: http://24.232.112.10/guestprivado.php?Mensaje=osndiceqtevaairmal"); exit; } ?> When i load this in my page it appears an error: Warning: Cannot add header information - headers already sent by (output started at c:/program files/apache group/apache/htdocs/guestprivado2.php:11) in c:/program files/apache group/apache/htdocs/guestprivado2.php on line 17 what's the problem?