Re: [Phplib-users] 7.4 session data
Brought to you by:
nhruby,
richardarcher
From: Nathaniel P. <np...@te...> - 2003-12-15 17:55:16
|
On 12/13/2003 2:36 PM, Frank Bax wrote : > I'm finally getting around to looking at 7.4 on a server that is still > running 7.2d. All seems to be going well, except that session files > are created in /tmp instead of using database. I traced this to > local4.inc - when I changed "session4.inc" to "session.inc", my > session data went back to my database. Can PHP4 native sessions > (which session4 is, I think) not use database tables? Do I care? > Should I use prepend.php3 instead, even though the server is running > PHP4? Can I mix and match session, user, auth, page files - or must > they all be from same set? > Okay, here's what happened. PHPlib 7.4 was extended to be able to use PHP4 sessions natively, which means that PHPlib running in that "mode" will just create a PHPLib API that interfaces with PHP4's sessions and PHP4 will handle all of the nitty-gritty session stuff itself. If you want the session data to be stored in the database you can do one of two things: 1) Use the session.inc, local.inc, and prepend.php3 scripts to do your session handling, in which case, PHPLib will handle all of the session stuff by itself, as before. 2) Use session4-custom.inc to define a custom PHP4 session storage container using your database. See these pages for more info: http://www.sanisoft.com/phplib/manual/php4_sessions.php http://www.sanisoft.com/phplib/manual/php4_cust_sessions.php http://www.php.net/manual/en/function.session-set-save-handler.php DO NOT mix and match the two sets of files. Unexpected results may and probably will occur. All of the *4.inc files expect PHPlib to use PHP's native session handling and adjust for that, the others assume that PHPlib handles all of the session stuff. That is the only real difference between the two. Things will work just fine with whichever set of files you choose to use, even if you're using PHPlib's PHP3-compatible sessions on PHP4. -- ___________________________ Nathaniel Price http://www.tesserportal.net Webmaster |