Re: [Webframework-general] Re: session manager
Status: Beta
Brought to you by:
staniszczak
From: Marcin S. <mar...@ga...> - 2005-11-28 10:23:11
|
Hi Ryan, Sorry for this bug - I correct it. Now I try this code with my old session handler, and all work fine. Why you manually call gc() method? gc() is automatically called by PHP, but with random frequency - see in php.ini session.gc_probability and session.gc_divisor./ But any way, when I call from my code in stop() manually gc(0), it work fine. Can you send my your session handler? I try test it and correct - if I found bug;-) web.framework with correct bug that you submit I submit to CVS. In next release this bug will by correct:-) Sorry for it and thanks for submit. Best regards, Marcin Staniszczak/ > hi marcin, i have try it. it work like charm. thanks. > anyway, i found on line 126 and 127 of webframerwork.class.php need a > little correction: > > - wrong method reference and missing dot[.] on line 126. > - wrong method reference on line 127. > - no sessionhandlers folder under context/session > > this the corrected script for line 126: > require_once(WEBFRAMEWORK_CORE_DIR.'Context'.DIRECTORY_SEPARATOR.'Session'.DIRECTORY_SEPARATOR.'SessionHandlers'.DIRECTORY_SEPARATOR.$this->arrConfiguration['settings']['sessionHandler'].'.class.php'); > > also, please help me to correct my session db handler. > > public function stop() { > return $this->gc(0); > } > > public function gc($intMaxLifeTime) { > $intLifeTime = strtotime('-1 minutes'); > $strSQL = "delete sessions where sessiontime<$intLifeTime"; > return odbtp_query($strSQL)?true:false; > } > > this gc, seems not delete the old session properly. but the same > method working good if run outside the framework. any idea, which one > i miss? > > tia, > ryan > */maeve fatimah az-zahra <mae...@ya...>/* wrote: > > thanks marcin. i will check it. > > ryan > > */Marcin Staniszczak <mar...@ga...>/* wrote: > > Hi Ryan, > > Pleas see in web.framework/Context/Session directory on file > SessionHandler.interface.php. You can implement this interface > in your > class and write with in DB handler for session. After define your > SessionHandler, please add to settings block in config.xml > line like this: > > Your class must be placed in > web.framework/Context/Session/SessionHandlers directory, and > must have > .clss.php extension (like MySQLSessionHandler.class.php). > > If you have any other questions please let me know. > > Best regards, > Marcin Staniszczak > > > > > [kelembutan-Mu, menjawab doa-doa diam kami] > > ------------------------------------------------------------------------ > Yahoo! Music Unlimited - Access over 1 million songs. Try it free. > <http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/> > > >------------------------------------------------------------------------ > >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: 2005-11-25 > > |