ID:               15409
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Feedback
 Bug Type:         Apache related
 Operating System: RH Linux 7.2 (kernel2.4.9-13smp)
 PHP Version:      4.1.1
 New Comment:

Would you still be so kind to test with standard 4.1.1?
(and I morked 15209 as critical for now)

Derick


Previous Comments:
------------------------------------------------------------------------

[2002-02-06 16:17:20] [EMAIL PROTECTED]

OK -- if you can't reproduce it, it's likely the result of the patch I
applied to our copy.  My apologies for entering this bug report before
testing against a standard 4.1.1 install.

But if you happen to know how to attack 15209...  :-P

------------------------------------------------------------------------

[2002-02-06 16:14:18] [EMAIL PROTECTED]

But I was unable to reproduce it here on RH 7.2/4.1.1

Derick

------------------------------------------------------------------------

[2002-02-06 16:13:31] [EMAIL PROTECTED]

Of course the headers are only sent when output is done.  I understand
that.  But the problem is that if there is no output other than the
header, the header is not displayed at all!

I just realized that a patch I quickly threw together for bug 15209 may
be to blame.  I'm quite confident that 15209 is a legitimate bug that
needs attention (although nobody seems to have done anything with it). 
Before anybody wastes time on this bug, 15209 should take priority.

------------------------------------------------------------------------

[2002-02-06 16:10:33] [EMAIL PROTECTED]

Who told you you can print a header like that?
Anyway... the headers are indeed only send when some output is done.

------------------------------------------------------------------------

[2002-02-06 16:05:15] [EMAIL PROTECTED]

The following script works when php is called from the command line:

<?php
print header("Location: http://www.yahoo.com/";);
exit;
?>

[myhost] php test.php
Location: http://www.yahoo.com/
Content-type: text/html

But when called via the Apache server (1.3.20), I get nothing (and
nothing in the error logs, so I don't think PHP is crashing):

[myhost] telnet localhost 80
Trying localhost...
Connected to localhost.
Escape character is '^]'.
GET /test.php HTTP/1.0

Connection closed by foreign host.

But if I print some non-empty string after I print the header, it
works:

<?php
print header("Location: http://www.yahoo.com/";);
print "\n";
exit;
?>

[myhost] telnet localhost 80
Trying localhost...
Connected to localhost.
Escape character is '^]'.
GET /test.php HTTP/1.0

HTTP/1.1 302 Found
Date: Wed, 06 Feb 2002 21:01:52 GMT
Server: Apache/1.3.20 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.4
OpenSSL/0.9.6b DAV/1.0.2
Location: http://www.yahoo.com/
Connection: close
Content-Type: text/html

This is not restricted to the Location header; other headers do not
display either, unless followed by some non-null print statement.





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=15409&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to