Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80677 invoked by uid 1010); 28 Jan 2004 10:52:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80577 invoked from network); 28 Jan 2004 10:52:23 -0000 Received: from unknown (HELO basiczlager.backendmedia.com) (195.75.116.242) by pb1.pair.com with SMTP; 28 Jan 2004 10:52:23 -0000 Received: from localhost (localhost [127.0.0.1]) by basiczlager.backendmedia.com (Postfix) with ESMTP id 10C6182F73 for ; Wed, 28 Jan 2004 11:52:22 +0100 (CET) Received: from basiczlager.backendmedia.com ([127.0.0.1]) by localhost (basiczlager [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12482-10 for ; Wed, 28 Jan 2004 11:52:17 +0100 (CET) Received: by basiczlager.backendmedia.com (Postfix, from userid 1005) id DDA6C831F7; Wed, 28 Jan 2004 11:52:17 +0100 (CET) Received: from backendmedia.com (port-212-202-37-146.reverse.qsc.de [212.202.37.146]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by basiczlager.backendmedia.com (Postfix) with ESMTP id 36CAC82FDA for ; Wed, 28 Jan 2004 11:52:17 +0100 (CET) Message-ID: <401793F3.2070003@backendmedia.com> Date: Wed, 28 Jan 2004 11:50:27 +0100 Organization: BackendMedia GbR User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: PHP Developers Mailing List Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at backendmedia.com Subject: Session From: smith@backendmedia.com (Lukas Smith) Hi, I am moving to the php internal session system and there are a number of stumbling blocks I want to bring up. Since I am new to the session system (I have read a few articles about it and writtten some code using it) I want to take the opportunity to discuss things here a bit before I submit feature requests :-) Specifically I am looking at adding my own session handler. The only reason for now to do so is that I want to extend the garbage collection to also delete a few other files that are generated over the coure of a session in my framework. 1) selective handler overwrite Unfortunately you cannot selectively overwrite the session handler and the defeault callbacks are not exposed to the user as function, so I have to reimplement the entire file handler even if I just want to modify the garbage/destroy callbacks. 2) custom session handler and session_destroy() The next stumbling block was tricky to find out. The pointer was in the user comments. Appearently if you call session_destroy the user defined session handler is forgotten. Even worse there is no way to get the session handler which means that whatever code section calls session_destroy (in my case PEAR::LiveUser) on logout needs to have the information about what custom session handler (what if any) to use. Interestingly the user defined session handler is not forgotten entirely as the session handling fails to load from here on forth until I set the session handler again. So it would be good to either not have the session handler forgotten when calling session_destroy() or if this is not feasible for some reason to have atleast a session_get_save_handler() function to get the handler if one is set so that it can easily be restored. gruss, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07