note 109627 deleted from function.session-set-save-handler by danbrown
| From: | danbrown@php.net | Date: | Fri, 10 Aug 2012 16:18:42 +0000 |
| Subject: | note 109627 deleted from function.session-set-save-handler by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-190014@lists.php.net to get a copy of this message | ||
Note Submitter: Perdurabo
----
Cloudranger said:
"The initial approach which most people on php.net seem to take is to write a custom session
handler class in PHP using MySQL, which is not a bad approach as you can use a memory based MySQL
table to gain performance. However it requires you to write code, and also to modify your website
to put in the session handler override code. If you have lots of website to change this is out of
the question."
1. You don't want to use memory tables for session data, because you don't want to lose
it. Same reason memcache is bad for session.
2. You don't have to modify your code at all. Put your overrides in a file and prepend it to
each php page with the following line in your Apache VirtualHost:
php_value auto_prepend_file dbSessionStore.php
All php session applications will "magically" have their session stored in the database.
We've been using this since 2005.