Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3814 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36983 invoked by uid 1007); 7 Aug 2003 20:35:07 -0000 Message-ID: <20030807203507.36982.qmail@pb1.pair.com> To: internals@lists.php.net Date: Thu, 07 Aug 2003 21:35:07 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 References: <20030807123647.61433.qmail@pb1.pair.com> <3F325931.4080401@wp-sa.pl> <20030807141706.32237.qmail@pb1.pair.com> <200308071306.25443.ilia@prohost.org> In-Reply-To: <200308071306.25443.ilia@prohost.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 81.79.62.69 Subject: Re: [PHP-DEV] [Proposal] Idea for Application level variables From: davey@php.net (Davey) Ilia Alshanetsky wrote: > It seems to be that what we're looking for is a simple wrapper around sysvshm > or shmop (we want win32 support?) that would create $_APP superglobal and > store data within that superglobal. The only issue would be that shm segment > cannot be easily resized and on many systems there is an upper limit on the > shm segment size. Which means you'd probably need to use a file backed shm > implementation such as anonymous mmap. This however means that you cannot use > shmop or sysvshm, however something like mmcache previously mentioned should > be a fine solution. All you'd need to do is make a wrapper around $_SESSION. > > Ilia You've hit the nail on the head! By literally copying and pasting the $_SESSION code over, s/_SESSION/_APPLICATION and forcing the SID to be a certain thing, you pretty much implement what I want. The reasons you cannot just wrap $_SESSION and force a SESSION SID is if you want SESSION vars *and* APPLICATION vars in the same script, you'll run into problems... cause you cannot run simulatenous sessions and you certainly cannot switch when you write to a different var. - Davey