Re: session handling set to database
Thanks ! Sure i could add some debugging to _gc, though i guess it won't show anything, because the method is never called. in the meantime i have checked php.ini files of both servers, these are the session directives: - my local server (sessions working) session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 14401440 session.gc_probability 0 - remote server (where sessions remain the database) session.entropy_length 16 16 session.gc_divisor 10001000 session.gc_maxlifetime 14401440 session.gc_probability 0 the only remarkable difference is the dc_divisor... hm... any ideas ? jyrgen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: session handling set to database
gc_probability/gc_divisor, e.g. 1/100 means there is a 1% chance that the GC process starts on each request. from: http://hr.php.net/manual/en/ref.session.php On Apr 2, 11:58 am, jyrgen [EMAIL PROTECTED] wrote: Thanks ! Sure i could add some debugging to _gc, though i guess it won't show anything, because the method is never called. in the meantime i have checked php.ini files of both servers, these are the session directives: - my local server (sessions working) session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 14401440 session.gc_probability 0 - remote server (where sessions remain the database) session.entropy_length 16 16 session.gc_divisor 10001000 session.gc_maxlifetime 14401440 session.gc_probability 0 the only remarkable difference is the dc_divisor... hm... any ideas ? jyrgen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: session handling set to database
Try: ini_set(session.gc_probability,100); ini_set(session.gc_divisor,100); ini_set(session.gc_maxlifetime,10); On Apr 2, 1:33 pm, majna [EMAIL PROTECTED] wrote: gc_probability/gc_divisor, e.g. 1/100 means there is a 1% chance that the GC process starts on each request. from:http://hr.php.net/manual/en/ref.session.php On Apr 2, 11:58 am, jyrgen [EMAIL PROTECTED] wrote: Thanks ! Sure i could add some debugging to _gc, though i guess it won't show anything, because the method is never called. in the meantime i have checked php.ini files of both servers, these are the session directives: - my local server (sessions working) session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 14401440 session.gc_probability 0 - remote server (where sessions remain the database) session.entropy_length 16 16 session.gc_divisor 10001000 session.gc_maxlifetime 14401440 session.gc_probability 0 the only remarkable difference is the dc_divisor... hm... any ideas ? jyrgen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: session handling set to database
thank you majna !! this solved the problem, finally. after i issued your settings all old session entries have been deleted. after that i switched back to a 1% probability, should be ok. i would suggest to include the gc_divisor setting into the cake session lib, in order to get equal results on different machines. ini_set(session.gc_divisor,100); jyrgen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: session handling set to database
On Apr 1, 7:11 am, jyrgen [EMAIL PROTECTED] wrote: is there any _gc probability / whatever php setting that is not overwritten by the cake session class, and has to be adjusted manually ? thx, jyrgen session cleaning depends on these php settings: session.gc_probability, session.gc_divisor and session.gc_maxlifetime. As far as I can tell, cakephp only sets session.gc_probability. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: session handling set to database
i will try to set gc_divisor and gc_maxlifetime in the session constructor... and see what happens... thank you very much jyrgen session cleaning depends on these php settings: session.gc_probability, session.gc_divisor and session.gc_maxlifetime. As far as I can tell, cakephp only sets session.gc_probability. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: session handling set to database
...but wait, these settings are only relevant for the PHP internal session management, while cake brings its own gc routines. or does it behave similar to PHP sessions by taking these values into account ?? sorry but i just don't get it. looking at the sources doesn't bring me any further here.. thanks again, jyrgen ps. can somebody of the developer guys (nate?) make it clearer ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: session handling set to database
I'm sorry, forget gc_maxlifetime, it think it's ignored when using the database. The other two determine when __gc is called by php. If you add this: ini_set('session.gc_divisor', 1); __gc will be called in every request (not recommended for production, obviously). Try adding some logging to __gc to see what's happening. On Apr 1, 4:20 pm, jyrgen [EMAIL PROTECTED] wrote: ...but wait, these settings are only relevant for the PHP internal session management, while cake brings its own gc routines. or does it behave similar to PHP sessions by taking these values into account ?? sorry but i just don't get it. looking at the sources doesn't bring me any further here.. thanks again, jyrgen ps. can somebody of the developer guys (nate?) make it clearer ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---