#19063 [Bgs]: Can't set any cookie. Received error warning about header.
| From: | h_tr_dung at hotmail dot com | Date: | Fri, 23 Aug 2002 15:40:39 +0000 |
| Subject: | #19063 [Bgs]: Can't set any cookie. Received error warning about header. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17668@lists.php.net to get a copy of this message | ||
ID: 19063
User updated by: h_tr_dung@hotmail.com
Reported By: h_tr_dung@hotmail.com
Status: Bogus
Bug Type: HTTP related
Operating System: WinXP Pro. and FreeBSD 4.6
PHP Version: 4.2.2
New Comment:
Thank you!!!
BTW, attention to anyone who uses Dreamweaver MX to encode your
document in Unicode (utf-8). You will experience the same problem. I
changed the encoding to Western (Latin1) and it worked just fine.
I guess the 'crap' you have mentioned is some code reporting that the
document was encode in Unicode (utf-8).
Previous Comments:
------------------------------------------------------------------------
[2002-08-23 10:57:19] rasmus@php.net
And "od -c" of your setcookie.php file reveals, as I predicted, that
you have crap before your <?php tag.
0000000 ï » ¿ < ? p h p \r \n s e t c o
o
0000020 k i e ( " C h i p _ N a m e
"
0000040 , $ C h i p ) ; \r \n e c h o
"
0000060 < B O D Y O n L o a d = \ "
0000100 l o c a t i o n = ' " . $ f o
r
0000120 w a r d i n g . " ' \ " > "
;
0000140 \r \n ? >
Use a non-bogus text editor and it should work fine.
------------------------------------------------------------------------
[2002-08-23 10:50:10] h_tr_dung@hotmail.com
Thanks rasmus,
Below are the links:
Test file:
http://vietecon.com/php/Test_Cookie.php
SetCookie file:
http://vietecon.com/php/setcookie.php
Source codes in ZIP
http://vietecon.com/php/cookie.zip
Domain vietecon running FreeBSD 4.6, Apache/1.3.26 (as I described).
P.S. Sorry to sniper if my tone was harsh to you.
------------------------------------------------------------------------
[2002-08-23 10:32:55] rasmus@php.net
It is very very unlikely that there is a PHP bug here. You probably
have something before the opening <?php tag in the file that sets the
cookie. Put up a .phps or a .zip file somewhere with the actual files
in question so we can have a look. And when we do explain your mistake
to you, you can apologize nicely to sniper.
------------------------------------------------------------------------
[2002-08-23 10:11:47] h_tr_dung@hotmail.com
My code has nothing wrong (as you can see)! This was a bug and I
reported it. However, I guess I should have done it with an aggresive
tone to get more attention from you.
Cheer
------------------------------------------------------------------------
[2002-08-23 07:15:40] sniper@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19063
--
Edit this bug report at http://bugs.php.net/?id=19063&edit=1