Re: Persistent PHP web application?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 06, 2005 at 08:41:57PM -0500, Jason Barnett wrote:
> >Does "not up to date" mean the code isn't working with current releases
> >of php 4 or 5? I'd be interested in giving it a try.
>
> I believe this is the case.  AFAIK the APC library doesn't support PHP5
> or at least it didn't when I looked at it.  If you want to pitch in
> support for APC you should just download it (or PEAR INSTALL it from the
> command line to try it :) )

I don't think Rasmus was talking about APC. AFAIK he mentioned some
extension code that used the Apache SAPI to run a PHP script to acheive
what we're talking about (persistent global vars/functions/objects etc). 

(quoting Rasmus):
> The apache-hooks SAPI can do this, although when I initially wrote it
> nobody seemed interested.  George fixed it/rewrote it to work much better,
> but nobody was interested in his version either, so the current
> implementation isn't up to date anymore.  The problem was likely that
> people really didn't understand how to use it and it is a rather unsafe
> thing to let PHP scripts fiddle with all the various Apache request hooks.
> You can really toast your server that way.  A simple generic data loading
> extension is something people will be able to understand and they are
> unlikely to destroy their server with it.

Rasmus, can you say more about what this is and it's current state of
functionality (or lack thereof)?

(back to quoting Jason):
> >I'm picturing an extension that would simply not allow an uncautious or
> >unknowing scripter to ruin the server, but would only allow him to store
> >all his app defs and data model startup stuff in a one-shot performance
> >booster.  It could even do it in a separate (CLI?) interpreter and copy
> >the data over (but only once!) to the Apache-embedded interpreter using
> >a shared memory resource... hmmm.
>
> So your process is something like (correct me if I misunderstand):
> <php_script>

[snip...]

> The above suggestion is quite messy and probably not thread-safe, but
> it's a start.  ;)

Well, bravo for venturing a possible implementation, but I'm not versed
in Apache or PHP internals to propose or evaluate one in that kind of
detail :(.  I don't know what is possible or how PHP internally stores
variables, functions, objects, etc that would make them able to persist 
or be shuffled around.

/jw

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux