Sessions - Put into database?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
legendaryfox
Forum Newbie
Posts: 3
Joined: Tue Dec 14, 2004 2:04 pm

Sessions - Put into database?

Post by legendaryfox »

Hi I'm new :D

anyways, As far as I understand, when you create a session, it usually gets saved into whatever session_save_path is. However, is it possible to put a session directly into a mysql database (ie nothing will be created in /tmp or in whatever session_save_path is)? If so, will it require extensive coding?

Many thanks!
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Check out [php_man]serialize[/php_man]
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

sure, you just write your own session handler functions.

http://ca3.php.net/manual/en/function.s ... andler.php
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

Post by lostboy »

http://www.phpbuilder.com/columns/ying2 ... hp3?aid=19 is an article on using mysql for session mgmt
Post Reply