Re: Shell script to remove old PHP4 sessions in /tmp
| From: | Daniel Gustafsson | Date: | Mon, 05 Jun 2000 13:26:51 +0000 |
| Subject: | Re: Shell script to remove old PHP4 sessions in /tmp | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1037@lists.php.net to get a copy of this message | ||
>This is obviously crude, so I hope that someone who knows more about PHP4
>sessions will suggest a better way to deal with expired sessions. Is there
>is a way within the PHP4 session support?
---8<--- (php.ini) ---8<---
session.gc_probability = 1 ; procentual probability that the
; 'garbage collection' process is started
; on every session initialization
session.gc_maxlifetime = 1440 ; after this number of seconds, stored
; data will be seen as 'garbage' and
; cleaned up by the gc process
---8<--- ---8<---
>Also, has anyone done any performance comparisons between file and say
>MySQL based sessions?
I'd put my money on the file-based ones. You wouldn't want to load the
database server anymore than you have to.