Since MODx currently uses the default PHP sessions on disk, I’m going to run into some trouble when I move to a load-balanced cluster without taking care of this. Despite all the research I have done, I’m still confused about how to set up PHP to use a database to store sessions without having to go into all my applications and rewrite the session calls by hand.
Can anyone point me to a guide that will walk me through setting up PHP to use custom session handlers and auto-prepend that to each file? (I assume this is what I need to do).
All the solutions I have read involve manipulating the application PHP files, rather than system wide settings, and in the case of MODx, that just isn’t feasible.
Thanks.
-
MODX Staff
- 10,725 Posts
That’s correct, it’s likely not feasible. Welcome to the worst feature of PHP IMHO. MODx 0.9.7 will come with the ability to define your own custom session_handler_class and will ship with a database session handler class by default.
Unfortunately, I’ve attempted to work this into the 0.9.6 architecture with very little luck; there are a lot of places that would have to be hacked to accomplish this in the existing releases.
Thanks.
I guess the only real solution until you release the next version is to do an NFS for the PHP session data?