session_set_save_handler in include file

From: Date: Fri, 18 Aug 2000 15:51:30 +0000
Subject: session_set_save_handler in include file
Groups: php.general 
Request: Send a blank email to php-general+get-12488@lists.php.net to get a copy of this message
Hi, everybody Hope this hasn't been discussed before, at least I haven't found anything. I've just got session_set_save_handler to work, defining my own functions saving the session to a database instead of files. However, instead of having these save handlig functions on every page, I'd like to put them in an include file, which causes some problems: somehow, the script is now setting a new cookie on each access to the page - it seems like it doesn't find the cookie that's already set. I've tried declaring $HTTP_COOKIE_VARS globally in each function without success. Any ideas about what could be wrong, any place I could look for more information or if it's possible to do it this way? Btw, I've tried placing the session_start() function both in the included and in the main file. --Fredrik

« previous php.general (#12488) next »