Does anyone know an easy way to have PHP use MySQL for session data rather than its current flat file?
I have looked into zebra but I don't think it's workable on my solution.
Currently I use session_start();
and $foo = $_SESSION['bar'];
in my scripts.
I have many 1000s of .php files all using this method, so its not possible to change them all to use a different method.
Zebra looks like it sort of fixes this, but still requires modification of all .php files which call session_start();
. This isn't really practical.
I'm hoping there is some kind of module or settings within PHP that just says, "Store sessions in this table in this database, not in flat files." Then no modification to .php files would be needed and I can scale correctly.
Is this possible?
Or do I need to just settle for the fact that I will not have to manually edit 1000's of files because of this lack of support in PHP?
I honestly would have thought that in today's cloudy internet PHP would have something like this almost built in as an option. But alas, My Google skills have failed me.