Re: How to issue a new session without closing the browser?

From: Date: Thu, 22 Feb 2001 05:08:21 +0000
Subject: Re: How to issue a new session without closing the browser?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41099@lists.php.net to get a copy of this message
I'm not sure what is the original function design of session_destory(). Committing that, my code does not delete currently registered session data from memory. This result in writing currently registered session write to session database again unless programmer explicitly unregister them. If you want to delete session data in memory, you can do that in pg_session_destory() or anywhere in you can use session_unset() to unset all session variables. User session handlers are called in this order. session is started explicitly or implicitly then pg_session_open() called and data is read using pg_session_read() at that time programmer can see session variables. (If programer calls my pg_session_destory() it only deletes data in db and data is still in memory) connection is closed. pg_session_write() is called (since session data is in memory, write back to session database) then pg_session_close() is called. I thought deleting only session data in database would give more freedom to programmers while working session variables. It might be better to put session_unset() in pg_session_destory(), if it suppose to. Regards, --- Yasuo Ohgaki === Original Message === Hi! I have used your postgresql session functions in http://www.php.net/manual/en/ref.session.php with few changes. I have a login.php page that register 3 things - the pg_connect string, - a login flag to indicate that we already have done the login - actual time In a second php page I test - if login variable is set, if not I redirect to the login page. - if time has expired, if affirmative redirect to login page I have added a "pg_session_destroy" in your "user functions" to delete the actual session but when I reenter in the login page the session_start() re-creates the data I have just deleted with the same session_id. I would like to know how to issue a new session without closing the browser? What did I missed? - Working with php 4.0.4 - php.ini contains session.auto_start Off session.cache_expire 180 session.cache_limiter nocache session.cookie_domain no value session.cookie_lifetime 0 session.cookie_path / session.cookie_secure Off session.entropy_file no value session.entropy_length 0 session.gc_maxlifetime 60 session.gc_probability 1 session.name PHPSESSID session.referer_check no value session.save_handler user session.save_path /tmp session.serialize_handler php session.use_cookies On - track_vars and gpc_globals are not enabled TIA -- Evelio Martínez

« previous php.general (#41099) next »