Jump to content

PHP Sessions Using MM


Kovo
 Share

Recommended Posts

HelloIm using shared memory as my save handler for my PHP sessions. So in my php.ini file its something like this: session.save_handler = mmThis "works" but I notice if the page does not refresh within 10 seconds or so, the session data is thrown out and a new session is created. Or atleast it seems so as the session id changes. It seems as if the data is extremely volatile and unless I keep running the script over and over again, the session is destroyed within 5-15 seconds. Once is switch back to session.save_handler = files, this behavior stops and everything is as it should be.Anyone have any ideas as to why this is happening? thank you.

Link to comment
Share on other sites

Memory is just volatile storage, it changes frequently. If the PHP application ends, all memory that it was using gets reclaimed by the OS. Files are obviously persistent storage. You can also use custom session handlers and save your session info in your database:http://w3schools.invisionzone.com/index.php?showtopic=9731

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...