Re: Session Clean up?
| From: | CPT John W. Holmes | Date: | Fri, 25 Jul 2003 20:44:44 +0000 |
| Subject: | Re: Session Clean up? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29486@lists.php.net to get a copy of this message | ||
> A question on cleanup?
> example:
> 1. Connection via mysql_connect via the web.
> 2. Know that mysql_connect relinquishes the connection link upon the
> script ending.
> 3. User performs work and has several global variables stored in memory
> on the server.
> 4. User doesn't logout at the end of the session, just quits the
> browser. So session_destroy() and unset($user) aren't ran.
> With that said, how does mysql clean up its cached globals for that
> user? From a setting timing out in the php.ini file? If so, which
> setting handles this? If not, does anyone know the process that mysql
> goes through on the server side to clean up left over cached
> variables? Thanks in advance.
MySQL doesn't have cached variables. Neither does PHP, really. Session files
are cleaned up based upon a php.ini setting, session.gc_maxlifetime, I
think. Variables are destroyed when the script ends.
Now, if you're storing your sessions in MySQL, then you must implement your
own clean up.
---John Holmes...