ID:               30789
 Updated by:       [EMAIL PROTECTED]
 Reported By:      spam at taylorw dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Session related
 Operating System: Linux - 2.6.8-gentoo-r3
 PHP Version:      Irrelevant
 New Comment:

Try to set session.use_trans_sid to 1 and check if cookies are enabled
in your browser.


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

[2004-11-15 07:08:41] spam at taylorw dot com

Description:
------------
I have tried 4.3.9 and 5.0.2 (both emerged via gentoo) with various
Apache 2.0.5x versions (currently using 2.0.52)... none seem to solve
this problem. Anytime session_start(); is called a new session is
created, along with a new session_id. I have verified that /tmp is
where the sessions are being stored, and have watched the directory as
I refreshed a page with nothing but session_start(); in it, and a new
session is created each time. And session autostart is not on in
php.ini.

Relevant php.ini information:

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = 
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor     = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0


Reproduce code:
---------------
/* Page One (page1.php)*/
<?php

session_start();

echo session_id();

?>
<a href="page2.php">click here for page 2</a>

/* Page Two (page2.php)*/
<?php

session_start();

echo session_id();

?>
<a href="page2.php">click here for page one</a>

Expected result:
----------------
The echo'ed session_id()'s should be the same for both pages, and no
new session file should exist in /tmp .

Actual result:
--------------
The session id's differ, and a new session file has been created in
/tmp . Refreshing either page creates another session file in /tmp as
well.


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


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

Reply via email to