note 109627 added to function.session-set-save-handler

From: Date: Thu, 02 Aug 2012 22:46:45 +0000
Subject: note 109627 added to function.session-set-save-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-189895@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 69.150.27.252 ---- Manual Page -- http://www.php.net/manual/en/function.session-set-save-handler.php Edit -- https://master.php.net/note/edit/109627 Del: integrated -- https://master.php.net/note/delete/109627/integrated Del: useless -- https://master.php.net/note/delete/109627/useless Del: bad code -- https://master.php.net/note/delete/109627/bad+code Del: spam -- https://master.php.net/note/delete/109627/spam Del: non-english -- https://master.php.net/note/delete/109627/non-english Del: in docs -- https://master.php.net/note/delete/109627/in+docs Del: other reasons-- https://master.php.net/note/delete/109627 Reject -- https://master.php.net/note/reject/109627 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#189895) next »