ID:               48191
 Updated by:       [email protected]
 Reported By:      jens at dutzi dot me
-Status:           Open
+Status:           Bogus
 Bug Type:         Session related
 Operating System: Debian (lenny)
 PHP Version:      5.3.0RC2
 Assigned To:      fb-req-jani
 New Comment:

Yes, and this is not a bug. :)


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

[2009-05-11 15:11:37] jens at dutzi dot me

thanks - your hint about "session.use_only_cookies" was the solution.

It seems, the default-setting for this configuration option had been
changed from off to on:

[j...@linux www]# php529/bin/php -i |grep session.use_only_cookies  
session.use_only_cookies => Off => Off

[j...@linux www]# php530/bin/php -i |grep session.use_only_cookies  
session.use_only_cookies => On => On

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

[2009-05-08 21:31:02] [email protected]

You must also check the "session.use_only_cookies" directive and set 
that also to 0 to be able to really use cookies. 

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

[2009-05-08 14:19:46] jens at dutzi dot me

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 this bug report at http://bugs.php.net/?id=48191&edit=1

Reply via email to