Persisting objects over application lifetime (without serialization)



Hello, is it possible when using PHP5 as an Apache module (with or without third party products/modules) to persist objects for the lifetime of the application?

I'm not talking about serializing objects when a request is processed, then unserializing them in the beginning of the next request - but rather thread-safe objects that can simultaneously be used by several requests.

I have been suggested making a PHP script that runs stand-alone, listening on TCP/IP for local requests from the Apache web scripts. While this absolutely is a feasible solution, I was hoping the same could be accomplished without the use of having a stand-alone script (which basically means another server process to watch and monitor).



Regards,
Nils Magnus

.



Relevant Pages

  • Re: notice and warning
    ... You expect some piece of data from a post in your script, ... So you use $_REQUEST["userid"] which works perfectly fine as long as you get the userid in via POST. ... Now you find yourself in the situation that when you call this script for any reason without the POST info, you will delete yourself if you prefer $_REQUEST over $_POST. ... Saying that using $_REQUEST 'scales better' is utter nonsense. ...
    (comp.lang.php)
  • Re: notice and warning
    ... You expect some piece of data from a post in your script, ... prefer $_REQUEST over $_POST. ... the different meanings the input should have based on how it arrives. ... that's bad design. ...
    (comp.lang.php)
  • Re: notice and warning
    ... You expect some piece of data from a post in your script, eg: userid. ... prefer $_REQUEST over $_POST. ... in this instance, it scales more 'easily'. ...
    (comp.lang.php)
  • Re: Reading remote Session ID
    ... i use a pink wand, just like your blue wand, but pink. ... Perhaps you can just make it harder for the script by ... require that the IP that makes the request for the page be the same ...
    (alt.php)
  • Re: [PHP] How does the Zend engine behave?
    ... include files compiled when the script is first compiled, ... Now suppose a second request ... PHP script to be executed. ... not actually the PHP tokenization. ...
    (php.general)