Re: Sessions in MySQL and save_handler...

From: Date: Fri, 09 Jun 2000 18:55:55 +0000
Subject: Re: Sessions in MySQL and save_handler...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1411@lists.php.net to get a copy of this message
August Zajonc wrote: > > I'm really struggling to get sessions going into MySQL. They work fine with > files. One thing I'm unsure about is what to set save_handler to when I've > got my own handler. My test script is simple, from an example at > phpbuilder.com. This all certainly seems straightforward, and I'm at a loss > to explain why it doesn't work. > > I'd also be interested in performce of DB sessions vs file sessions for 500 > concurrent users. > I've had some difficulty with file based sessions, although I'm storing several large objects in the session. The speed of file based sessions will actually be a bit better than DB sessions, though the advantage of DB sessions is that they have better performance when you need to share the session between several front side servers. The problems I was having was that sometime PHP would open and write the session to the file, and other times it would not. I've not really been able to pin down the actual problems. My solution was to write a shared memory session module. (This won't work at all with multiple front side servers, of course) I can't guarantee that this code isn't still really buggy, I wrote it yesterday, but I'll post it anyways. I'm going to put it up on SourceForge, eventually. Note that LIB_DEBUG and LIB_ERROR have debugging and error code in them, and define the functions 'debug', 'error' and 'dumper' James

« previous php.general (#1411) next »