|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-13 21:50 UTC] kalowsky@php.net
[2002-09-19 13:24 UTC] kalowsky@php.net
[2014-08-09 20:05 UTC] rasmus@php.net
-Block user comment: No
+Block user comment: Yes
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 16:00:01 2025 UTC |
Hi, i have used the php session with pgsql handler, for user authencation. but I find that the php session key, PHPSESSID is changed same page. that sistuation is not always, but a few time. my debug code below. -------------------------------------------- session_register("userinfo"); $q_update = "UPDATE session SET userid = '".$userinfo->id."' WHERE sesskey = '".$PHPSESSID."'"; pg_exec($conn, $q_update); -------------------------------------------- the register value "userinfo" is class var. in debug result, the empty PHPSESSID value, not null value value is recorded. and Session key is threr changed. 1. orginal sesskey 2. empty sesskey 3. new sesskey That result in no login because sesskey is changed. why that cause ? addition, why be The PHPSESSID empty value ? that is not normal. that situtaion result in session share. 1. user A -> login with sesskey1(sucess) 2. user B -> login with sesskey2(sucess) 3. user A -> logout and new sesskey in empty value 4. user B -> logout and new sesskey in empty value 5. so A and B share same sesskey. After that sistuation, 6. user A login sucessful, and user B load other page, that user B have user A's session value, so user A and B share session with empty sesskey. That is prevented from php session lib that empty value of sesskey no permitted. thanks for advanced.