Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26245 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3861 invoked by uid 1010); 25 Oct 2006 09:36:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 3846 invoked from network); 25 Oct 2006 09:36:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Oct 2006 09:36:01 -0000 Authentication-Results: pb1.pair.com header.from=glenn.richmond@ilisys.com.au; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glenn.richmond@ilisys.com.au; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ilisys.com.au from 203.202.10.83 cause and error) X-PHP-List-Original-Sender: glenn.richmond@ilisys.com.au X-Host-Fingerprint: 203.202.10.83 mail21.ilisys.com.au Linux 2.4/2.6 Received: from [203.202.10.83] ([203.202.10.83:34331] helo=mail21.ilisys.com.au) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/4A-34241-FFF2F354 for ; Wed, 25 Oct 2006 05:36:01 -0400 Received: (qmail 21076 invoked from network); 25 Oct 2006 19:35:56 +1000 Received: from unknown (HELO ?127.0.0.1?) (203.202.11.226) by mail21.ilisys.com.au with SMTP; 25 Oct 2006 19:35:56 +1000 Message-ID: <453F2FFC.5010206@ilisys.com.au> Date: Wed, 25 Oct 2006 17:35:56 +0800 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Antony Dovgal CC: internals@lists.php.net References: <453F2897.1050400@ilisys.com.au> <453F29ED.4050807@zend.com> In-Reply-To: <453F29ED.4050807@zend.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP user session handlers From: glenn.richmond@ilisys.com.au (Glenn Richmond) Done, I've just tested on PHP Version 5.2.0RC7-dev (today's snapshot) and get the same result. The code is: session_start(); $_SESSION['testing'] = $contents; session_write_close(); unset($_SESSION['testing']); session_start(); $newcontents = $_SESSION['testing']; session_write_close(); There is a php file prepended to all code executions that sets up the custom handler and it works for the first session_start, but on the second call to session_start, I get: *Fatal error*: session_start() [function.session-start]: Failed to initialize storage module: user (path: /tmp/php_sessions) i.e. It still knows that it's a custom defined handler, but the references to the functions are gone. If I make a call to session_set_save_handler after the first session_write_close, the problem goes away. Of course, this isn't practical for a large number of sites. Glenn. Antony Dovgal wrote: > On 10/25/2006 01:04 PM, Glenn Richmond wrote: >> Hi guys, >> >> Just wondering what the status of the user-defined session handlers is? > > I don't think it makes any sense to ask such questions on the list, > for the answer in most cases is "they are doing fine, thank you". > Just grab the latest snapshot, test it and report any issues you see. > >> I've tested with 5.2rc4 and there is an issue that the references to the >> user functions get erased when the user calls session_write_close or >> session_destroy. This means that the system reverts to an alternative >> handler. >> >> Any idea if this issue has been resolved or if not, how it could be >> resolved? It basically makes large-scale user-defined session handlers >> impossible (for general website handling). It has been discussed >> previously, but no solution has been proposed as of yet. >