RE: [phplib] The change to PEAR... From: Chris Johnson (chris <email protected>)
Date: 01/18/01

A PHP application server as you describe is a great idea. I'm only
surprised because I figured that the folks who developed mod_php had
already done most of that -- i.e. the Apache instance (Unix process) is
much longer lived, and mod_php could certainly have data stores which
persist across pages. Somehow, I thought all along mod_php was smart
enough keep connections in such a place, and with PHP4, sessions as
well.

I guess not! :-)

So...how soon can we have this PHP app-server, and how can I help make
it happen?

..chris

> -----Original Message-----
> From: Kristian Köhntopp [mailto:kk <email protected>]

> Imagine a single PHP server process, independent of a web
> server. If you
> request a PHP page from a web server, a stub server API would
> gather all
> needed request parameters, ship them to the PHP server process, that
> process would produce the result page, and ship it back to
> the web server
> process. That process would send the generated page back to
> your browser.

> But our PHP server could not have a special array
> called $SHARED[], which is NOT cleared at the end of a
> request and which
> is not private to a single request thread but shared by all requests.
> Because these variables are part of a single Unix process,
> and that process
> does not end, you could even keep ressources in this array,
> like database
> connections, image handles or open files. This finally allows for
> proper ressource pooling and usage instead of lame pconnects().
>
> One would wish for another array $SESSION[], which is just a
> shorthand for
> $SHARED["sess_".SID][]. Using the $SESSION[] array, you'd
> simply store things
> you wanted to remember in that array and they would stick around on a
> per session basis. No page_open(), no session_start() needed.
>
> Simple, compatible and easy to understand. And much more
> powerful than any
> session management library could ever be.

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>