From: moisadoru at gmail dot com
Operating system: Ubuntu linux 9.10alpha3 64bit
PHP version: 6SVN-2009-08-16 (snap)
PHP Bug Type: HTTP related
Bug description: setcookie() segfaults the php process when adding a positive
expires value
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 bug report at http://bugs.php.net/?id=49273&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49273&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49273&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49273&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49273&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=49273&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49273&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=49273&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=49273&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=49273&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=49273&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=49273&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=49273&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=49273&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49273&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49273&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49273&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=49273&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=49273&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=49273&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=49273&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=49273&r=mysqlcfg