I've been looking into making my own session handler for my PHP application, simply because I want to store the session data in a MySQL Memory table instead of on the local filesystem.
There are 4 main reasons for me to do this.
- The MySQL server is local, so reading from memory will be faster.
- Being able to list active users
- Making an easy way for an admin to read and modify a user session, without having them logging ind and out.
- Being able to run scripts after a session timeout, or a user "idle" variable in the session.
I can't seem to find any easy way for doing this.
I could use memcached, but it would result in doubling the session data in the memory on my server.
Does anybody know of an easy way, to force PHP at run-time, to use a MySQLi resource as session storage?