Session problem in PHP4.0.3pl1
| From: | Paulson, Joseph V. \"Jay\" | Date: | Fri, 27 Oct 2000 22:49:02 +0000 |
| Subject: | Session problem in PHP4.0.3pl1 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22386@lists.php.net to get a copy of this message | ||
Hello everyone!
I've got a new problem now. When I call the session_start() function it
creates a new session id for the current session when a user logs into my
site. However, on the next page the user goes to I call session_start()
again as normal, BUT for some reason it gives the user a new session id. I
don't have a clue as to why it's doing this and I've tried several things.
I've tried:
session_id($SID);
session_start();
I tried this to over ride the new session id that session_start() creates
(the $SID is passed through the URL throughout the enitre site after a user
logs on). This doesn't work and it still creates a new session id. This
creates a huge problem because I'm not using cookies just the files that php
creates in the /tmp directory.
What I'm finding is that all my user session variables are being set to one
of these files but with the session_start() always giving the user a new
session id I lose these session variables. This is very frustrating and I
was wondering if anyone had the same problem and what did you do? Any
suggestions on how to keep the same session id throughout the site so php
won't create a new one everytime session_start() is called (FYI it even
creates a new session id if you don't use session_start() but instead use
session_register() when you register your variables).
Anyway, thanks for any help you can offer! :)
Jay Paulson