ID:               21821
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Bogus
 Bug Type:         Session related
 Operating System: BSD/OS 4.2
 PHP Version:      4.3.0
 New Comment:

And this really doesn't work like that..
You can't set/unset cookies by mangling the $_COOKIE[] array anyway.

Please ask support questions elsewhere.



Previous Comments:
------------------------------------------------------------------------

[2003-01-22 11:49:29] [EMAIL PROTECTED]

Ahum - NULL (inserted for readibility) apparently is '' not, void.

------------------------------------------------------------------------

[2003-01-22 11:43:11] [EMAIL PROTECTED]

The following script:
<?php
error_reporting(E_ALL);
if(isset($_COOKIE[session_name()]) &&
!file_exists(session_save_path(NULL) . '/sess_' . session_id(NULL)))
        unset($_COOKIE[session_name()]);
ini_set('session.use_only_cookies', TRUE);
ini_set('session.cookie_lifetime', 7 * 24 * 3600);
ini_set('session.gc_lifetime', 7 * 24 * 3600);
session_start();
?>
<html>
<body>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?foo=<?php echo time();
?>">refresh</a>
<pre>
<?php var_dump($_SESSION); ?>
</pre>
</body>
</html>

<?php
$_SESSION['test'] = 'hi' . $_GET['foo'];
?>

Creates warnings about illegal chars in the session id. However - there
is no valid session here, as there is no valid cookie. It should send a
new cookie instead, with a new generated session id. However - it sets
an empty id:
Set-Cookie: PHPSESSID=; expires=Wed, 29-Jan-2003 17:37:42 GMT; path=/

If I also unset $_SESSION, it doesn't change anything.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21821&edit=1

Reply via email to