Hello, I'm wondering if it's possible to make PHP use MySQL instead of files to store the sessions from all the sites i host (things like changing session.save_handler on php.ini). I haven't found anything on google and i would appreciate if someone can help me. Thanks.
A simple search on google for "php mysql session" returned quite a few hits that seem to hold information...
sjau, I guess you are talking about how to implement mysql session storage for a single script or program. When you start a sessions (session_start()), php store its information (session varibles) on /var/lib/php5 (depending of your conf) using files. What i'm trying to do is to store this information on MySQL.
You can do it with the session_set_save_handler() function. Have a look at the section Custom Session Handlers on http://www.php.net/manual/en/ref.session.php and at http://www.php.net/manual/en/function.session-set-save-handler.php .
Thanks falko. It was possible to this using a software called sharedance ( http://www.php.net/manual/en/ref.session.php#47603 )