Re: [Proposal] Idea for Application level variables

From: Date: Thu, 07 Aug 2003 20:35:07 +0000
Subject: Re: [Proposal] Idea for Application level variables
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-3814@lists.php.net to get a copy of this message
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

« previous php.internals (#3814) next »