#29322 [Asn->Bgs]: Constant SID already defined with session_regenerate_id()
| From: | sas@php.net | Date: | Mon, 02 Aug 2004 09:10:08 +0000 |
| Subject: | #29322 [Asn->Bgs]: Constant SID already defined with session_regenerate_id() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-63899@lists.php.net to get a copy of this message | ||
ID: 29322
Updated by: sas@php.net
Reported By: olivier dot bichler at laposte dot net
-Status: Assigned
+Status: Bogus
Bug Type: Session related
Operating System: Windows XP
PHP Version: 5CVS-2004-07-22 (dev)
Assigned To: sas
New Comment:
SID is not a CS constant.
Previous Comments:
------------------------------------------------------------------------
[2004-08-02 11:02:40] derick@php.net
Sascha, is he right?
------------------------------------------------------------------------
[2004-07-22 11:41:41] olivier dot bichler at laposte dot net
Description:
------------
session_regenerate_id() destroy the false constant : it destroy the
constant sid in lower case instead of the constant in upper case...
In PHP sources :
/* if the SID constant exists, destroy it. */
zend_hash_del(EG(zend_constants), "sid", sizeof("sid"));
should maybe be
/* if the SID constant exists, destroy it. */
zend_hash_del(EG(zend_constants), "SID", sizeof("SID"));
(file session.c)
(Please excuse me for my bad english ;-))
Reproduce code:
---------------
<?php
define('sid', 'essai');
session_start();
session_regenerate_id();
echo SID."\n";
echo sid;
?>
Expected result:
----------------
jg9vejq8p3e15lfu34vbouc6j3
essai
Actual result:
--------------
Notice: Constant SID already defined in D:\essai.php on line 5
Notice: Use of undefined constant sid - assumed 'sid' in D:\essai.php
on line 8
sid
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29322&edit=1