[phplib-dev] sql session save handler (nearly) finished From: R.B. Scholtus (regiment <email protected>)
Date: 12/06/00

Hello all,

Just i minute ago i got this SH_Sql session save handler completed and
running (with a patched version of php403pl1)

Config is as easy as:
class Example_SH_Sql extends SH_Sql {
  var $session_name = "Example_SH_Sql";
  var $database_class = "DB_Example"; ## Which database to
connect...
  var $database_table = "active_sessions"; ## and find our session data
in this table.
}

Installing is as easy as:
$save = new Example_SH_Sql;
$save->start();

Because the class uses the array version syntax of session_set_save_handler,
you need to patch php403pl1 to get it to work. In the ext/session directory
of the php403pl1 source tree i upgraded the following files:
mod_user.c form 1.8 to 1.9
mod_user.h from 1.5 to 1.6
php_session.h from 1.35 to 1.36
session.c from 1.176 to 1.177

After upgrading these files from cvs i ran a (in ext/session)
make clean
make
cd ../..
make
su root
/somewhere/apachectl stop
make install
/somewhere/apachectl start

About the SH_Sql class:
The array syntax of session_set_save_handler now works, but somehow these
functions in session_set_save_handler() show no interactivity with the
members of the class. Probably this is due to my patch of php. This
afternoon ill look into this. All works quite well now, its just a little
unnatural.

Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>