Session Problems

PeteEMT

Joined: 2005-05-22
Posts: 2
Posted: Sun, 2005-05-22 22:31

I hope someone can help me.

I've got a PHP user management/login system that is developed for my website.

When a User Logs in, a MySQL database is queried for a match and if successful, a session is started and the following keys are sent:
$_SESSION['Nickname']
$_SESSION['login_hash'] (md5 of their NickName,Password and another constant variable)

This works fine for all my pages BUT Gallery, I've went through the tutorial on embedding it and such. And created the appropriate Class files and other modifications.

It works some of the time. By outputting the session varaible in a foreach type statement, I can see when I initially enter the gallery my session variables are there, when I enter an Album only the gallery variable is there.
When it works, all the variables are there. Problem is I can't narrow down why/when it works. If I change something like add a start_session() someplace, it will work for maybe 2-3 hours then stop agaiin.

I was storing the Sessions in a mysql table (modified gallery's .htaccess to use this) Thought maybe that was the problem, so switched everything to files.

Also tried including the session.php in my login script to create the Gallery session variable when I login but that disappears too.

The variables arent getting wiped; if I navigate out of gallery, they are back again.

 
PeteEMT

Joined: 2005-05-22
Posts: 2
Posted: Thu, 2005-06-02 20:35

An update on this. I now see when Users enter Gallery, it creates it's own session_id which is blank.

So the user ends up with two. I don't knw how to get Gallery to use the existing.