Re: Persistent PHP web application?

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

 



Richard Lynch wrote:
Or you could pay a guy who knows C and PHP to do it in, what, a couple
hours?  Depends on how confusing your arrays are, and how heterogeneous
they are, I guess.

Once you do that, all your data is in PHP/Apache when it launches, and
it's always available to your PHP script all the time.  Sweet.

Anything you do in the MINIT hook is basically free, so it would be trivial to load the data for the array from somewhere. Like a database, an xml file, etc. So you wouldn't need to hardcode a complex array structure in your MINIT hook, just have this generic little extension that creates an array (or object) from some external source. To change the data you would change that external source and restart your server, or you could write a PHP function in your extension that forced a reload with the caveat that each running httpd process would need to have that function be called since your array/object lives in each process separately.


If you ask really nicely one of the folks on the pecl-dev list might just write this thing for you. Especially if you spec it out nicely and think through how it should work.

-Rasmus

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