@session_start generates a new session_id
| From: | Mark-Walter at t-online dot de | Date: | Tue, 19 Oct 2004 13:01:13 +0000 |
| Subject: | @session_start generates a new session_id | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-199800@lists.php.net to get a copy of this message | ||
Hi,
I made an update to Apache/1.3.31 (Unix) PHP/4.3.9 and
before this everythings works fine.
The problem is that a following page generates a new
session stored under the session.save_path and the
stored variable e.g. $_SESSION['SESS_CUS'] is not
valid anymore due the SID entry.
On both pages I use this to start:
@session_start();
session_name("userauth");
$_SESSION['SESS_CUS'] = $user_id;
to verify the $USER_ID in conjunction with the actual
valid session value.
I tried already a form with a hidden field to overgive
the session which works fine in the former version:
<form method=post action=\"./MyFILE.php?USERNAME=$realname&USER_ID=$user_id\">
<INPUT TYPE=\"hidden\" NAME=\"session_name();\"
value=\"session_id();\">
<INPUT TYPE=\"submit\" VALUE=\"Login for the board\">
</form>
But this doesn't work anymore ...
The new LAMP system generates everytime after calling
@session_start(); a new session. Either on the same
page or a following one.
How can I prevent this behavior by using the PHP session
management function ?
--
Best Regards,
Mark