php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3034 SetCookie bug
Submitted: 1999-12-23 20:10 UTC Modified: 2005-03-30 09:02 UTC
From: mog at linux dot nu Assigned:
Status: Wont fix Package: Reproducible Crash
PHP Version: 3.0.11 / 4b3 OS: win32 cgi
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [1999-12-23 20:10 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-23 20:16 UTC] rasmus at cvs dot php dot net
I can't reproduce this on Linux nor on Win98 running 4.0b3
 [1999-12-24 15:20 UTC] 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
 [2005-03-30 09:02 UTC] 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.


 [2007-04-10 10:52 UTC] senglathsamy at laodev dot com
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!
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC