#3034 [Com]: SetCookie bug
| From: | senglathsamy at laodev dot com | Date: | Tue, 10 Apr 2007 10:52:21 +0000 |
| Subject: | #3034 [Com]: SetCookie bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111285@lists.php.net to get a copy of this message | ||
ID: 3034
Comment by: senglathsamy at laodev dot com
Reported By: mog at linux dot nu
Status: Wont Fix
Bug Type: Reproducible Crash
Operating System: win32 cgi
PHP Version: 3.0.11 / 4b3
New Comment:
I have problem with using setcookie with linux webserver.
my first test:
setcookie("use","text");
// by this code it's working well with both Windows and Linux (FC6)
pathform;
The second test:
setcookie("use","text",time()+3600);
// by this code it's working well with Windows pathform.
// But it's have some problem with Linux (FC6)pathform, when I call
thge cookie by $_COOKIE["use"] is warmming as "Notice: Undefined index:
User in /var/www/html/test.php on line 2"
help me plz!
Previous Comments:
------------------------------------------------------------------------
[2005-03-30 09:02:24] sniper@php.net
We are sorry, but we can not support PHP 3 related problems anymore.
Momentum is gathering for PHP 5, and we think supporting PHP 3 will
lead to a waste of resources which we want to put into getting PHP 5
ready. Of course PHP 4 will continue to be supported for the
forseeable future.
------------------------------------------------------------------------
[1999-12-24 15:20:45] mog at linux dot nu
That's strange, i'm quite sure that it crashed with the code i sent.
However, it didn't now, and, this code with 71 "%" char's (problably
crashes with less) crashes php.
It crashes even if the header was already sent.
<?PHP
$text =
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%";
SetCookie("cookie",$text); // This is where PHP (3.11|4b3) crashes
?>
---- _old_ report ----
This code crashes php-3.11 win32 cgi and php4-b3
In win32 cgi mode this brings up a "Access Violation" box.
web server is Apache/1.3.9-win32.
<?PHP
$text = "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%";
SetCookie("cookie",$text,0); // This is wher PHP (3.11|4b3) crashes
?>
php3.ini is unmodified except for modules stuff that wasn't working
anyway
------------------------------------------------------------------------
[1999-12-23 20:16:03] rasmus at cvs dot php dot net
I can't reproduce this on Linux nor on Win98 running 4.0b3
------------------------------------------------------------------------
[1999-12-23 20:10:46] mog at linux dot nu
This code crashes php-3.11 win32 cgi and php4-b3
In win32 cgi mode this brings up a "Access Violation" box.
web server is Apache/1.3.9-win32.
<?PHP
$text = "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%";
SetCookie("cookie",$text,0); // This is wher PHP (3.11|4b3) crashes
?>
php3.ini is unmodified except for modules stuff that wasn't working
anyway
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=3034&edit=1