From:             jens at dutzi dot me
Operating system: Debian (lenny)
PHP version:      5.3.0RC2
PHP Bug Type:     Session related
Bug description:  Passing the Session ID won't work after disable 
session.use_cookies

Description:
------------
When forcing PHP to not use cookies for sessions, PHP doesn't recognize
the existing session. Instead it will create a new one. Session files will
be created as expected.

The Bug can be reproduced with:
1.) ini_set('session.use_cookies', 0); in the php-code
and
2.) session.use_cookies = 0; in php.ini

The following sample code is identical to
http://www.php.net/manual/en/session.idpassing.php

Reproduce code:
---------------
<?php
// Disable Cookie-Usage
ini_set('session.use_cookies', 0);

// Start the session
session_start();

if (empty($_SESSION['count'])) {
        $_SESSION['count'] = 1;
} else {
        $_SESSION['count']++;
}
?>

<p>Hello visitor, you have seen this page <?php echo $_SESSION['count'];
?> times.</p>
<p>To continue, <a href="test.php?<?php echo htmlspecialchars(SID);
?>">click here</a>.</p>

Expected result:
----------------
On the first run, a new session should be created with $_SESSION['count']
= 1. On everey reload $_SESSION['count'] should be increased. (s.a. example
#1 at http://www.php.net/manual/en/session.idpassing.php)

Actual result:
--------------
On every run, PHP creates a new session with $_SESSION['count']=1.

-- 
Edit bug report at http://bugs.php.net/?id=48191&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48191&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48191&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48191&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48191&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48191&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48191&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48191&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48191&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48191&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48191&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48191&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48191&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48191&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48191&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48191&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48191&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48191&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48191&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48191&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48191&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48191&r=mysqlcfg

Reply via email to