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

Patrick R. Michaud pmichaud
Thu May 6 19:16:57 CDT 2004


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).

Pm



More information about the pmwiki-users mailing list