note 15906 deleted from function.session-id by jimw
| From: | jimw@php.net | Date: | Wed, 02 Jan 2002 11:36:03 +0000 |
| Subject: | note 15906 deleted from function.session-id by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-24225@lists.php.net to get a copy of this message | ||
something to consider (workaround), using the global variable SID:
using a string like
1) "sid=".session_id()
2) SID
.. should produce the same results (if you set "session.name=sid" in php.ini)
consider these lines of code:
session_start();
$send = $PHP_SELF . "?" .session_id();
echo "SID is .. " , SID;
echo "send is .. " , $send;
I am developing under conectiva linux using opera 5.5, konquerer and netscape ..
opera and netscape produce the following (correct) output:
SID is .. sid=cf3706ad938616f9e4f3150ae5906c5d
send is .. /konquerer_test.php?sid=cf3706ad938616f9e4f3150ae5906c5d
konquerer (v1.9.8 KDE2) does not (!!) :
SID is ..
send is .. /konquerer_test.php?7f0bb576ce6f303c09a23ed5d6c99ba1
==>> meaning SID is empty, therefore if the user has cookies disabled, a _new_ session will
start in another script instead of re-establishing the old session.
I have no idea why PHP4 will not set SID in this case - but if you attach SID in href's to
URLs, better use session_id() instead to be on the safe side:
echo "<href='url?='" . session_id();
instead of
echo "<href='url'" . SID;