hello,
i want to store sessions in mysql tables using session_set_save_handler function.
While reading some articles i came across the fact that while sessions are stored in files, the sessions are locked, but when sessions are stored in mysql using custom functions, sessions are not locked.
i also read that when sessions are stored in mysql using custom functions there will be problems when 2 persons simultaneously access the sessions.
is this issue solved in the latest versions of php?
or is there still problems of session locking?
First off, why do you need to do this? Perhaps a better description will garner some decent responses, but for the most part what you are wanting to do is not necessary.
Secondly, it is not about the lock so much as two clients simultaneously accessing the session: regardless of locks, you have will likely have no way to know which does what first. If script1.php sets admin false and script2.php sets admin true, and you run both at once (via frames/ajax/whatever) then admin will be true or false based solely on which script finishes execution last.
the thing which i’ve doubt is: if 2 users having 2 different session ids, access a page at the same time in which there is a script to modify the session data. Will it change the value of the other person’s session data accidentally if sessions are stored in mysql.
thanks a lot guys for replying…i was just wondering, how does php generate the session id - PHPSESSID? What are the parameters used for generating this hash?