Bug #49273 [Opn->Fbk]: setcookie() segfaults the php process when adding a positive expires value
| From: | geissert@php.net | Date: | Sun, 03 Jul 2011 08:22:02 +0000 |
| Subject: | Bug #49273 [Opn->Fbk]: setcookie() segfaults the php process when adding a positive expires value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161523@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=49273&edit=1
ID: 49273
Updated by: geissert@php.net
Reported by: moisadoru at gmail dot com
Summary: setcookie() segfaults the php process when adding a
positive expires value
-Status: Open
+Status: Feedback
Type: Bug
Package: HTTP related
Operating System: Ubuntu linux 9.10alpha3 64bit
PHP Version: 6SVN-2009-08-16 (snap)
Block user comment: N
Private report: N
New Comment:
Please try using this snapshot:
http://snaps.php.net/php-trunk-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2009-08-16 18:00:48] moisadoru at gmail dot com
This bug is also present in the latest SVN (r287372)
------------------------------------------------------------------------
[2009-08-16 16:58:56] moisadoru at gmail dot com
Description:
------------
When setting a cookie with setcookie(), if the expires parameter is a positive integer, the PHP
child process segfaults.
Environment; Apache 2.2.12, PHP 6.0-200908152030, Ubuntu 9.10 alpha3 linux kernel 2.6.31 64bit.
Reproduce code:
---------------
<?php
header('Set-Cookie: cookie1=foo1; expires=Sun, 16-Aug-2009 16:39:00 GMT; secure;
HttpOnly', TRUE, 200); // works
setcookie('cookie2', 'foo2',); // works
setcookie('cookie3', 'foo3', -3600); // works
setcookie('cookie4', 'foo4', 3600); // segfaults
echo '<pre>';
print_r($_COOKIE);
?>
Expected result:
----------------
$_COOKIE array dumped to screen
Actual result:
--------------
Apache error log:
[Sun Aug 16 19:06:38 2009] [notice] child pid 22565 exit signal Segmentation fault (11)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=49273&edit=1