Re: mysql user session handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/9/09 4:16 AM, "Ford, Mike" <M.Ford@xxxxxxxxxxxxxx> wrote:

>> -----Original Message-----
>> From: Tom Worster [mailto:fsb@xxxxxxxxxx]
>> Sent: 09 September 2009 02:29
>> 
>> thanks, Devendra, that's pretty much the same as my handler. (though
>> i can't
>> figure Rich Smith's $sess_save_path global. do you know what is
>> for?)
> 
> I think if you look at the comments on that article, he's agreed that's an
> error and shouldn't be there.

i didn't read any of the comments, thanks for pointing it out.

while we're looking at mr. smith's article...

"Depending on how your code is structured, PHP does not always automatically
save any session data.  To be certain you are retaining your session data
all the time, be sure to call the session_write_close() function at the end
of each page."

what are the specific conditions under which php _does_not_ write session
data when a script terminate?

according to the php manual,
http://www.php.net/manual/en/function.session-write-close.php
session_write_close() allows a script to release its lock on the session
allowing other scripts to use it. it implies you wouldn't "usually" use it
otherwise.


>> but what i'm really interested in is people's experience in
>> switching over
>> to and using this kind of handler: pitfalls, gotchas, etc. or is it
>> really
>> as easy and simple as all these online articles i've read about it
>> claim?
> 
> I moved from a single server to a load-balanced setup with 2 back-end servers.
> I switched to a database-based session handler very similar to the one under
> discussion (just tailored to my house style, really) and it just worked.  Been
> running happily in production for about 6 months now.

thanks for the info.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux