[Pmwiki-users] Re: PHP-question -- sharing data between invocations

Thomas -Balu- Walter list+pmwiki-users
Fri May 7 03:58:41 CDT 2004


On Thu, May 06, 2004 at 07:16:48PM -0600, Patrick R. Michaud wrote:
> On Thu, May 06, 2004 at 11:48:36PM +0200, Christian Ridderstr?m wrote:
> > 
> > Anyway, my question was more PHP-related in general, i.e. if/how 
> > information can be shared between invocations.
> 
> Well, this is what PHP's session handlers do -- they preserve information
> across sessions on a per-user (per-browser) basis.  But you can also
> make use of PHP's serialize() function to save and load data structures
> to/from disk.  AFAIK there's not a way to preserve information in 
> memory across PHP invocations, because usually it's different instances 
> of the PHP interpreter that runs in each case (each with its own memory space).
> 
> If you're willing to be limited to Unix environments, you might also
> look at the shared memory functions (http://us3.php.net/manual/en/ref.sem.php).

Shared memory won't work here I guess since the scripts were going to be
started one after another and not at the same time :)

Shared memory + Semaphores is a beast btw ;)

     Balu



More information about the pmwiki-users mailing list