Database connections (and other resources) are persistent on the per-server-process level. What this means that an open connection in one server process cannot be reused from within another server process.I see. This is sad news indeed.
From the web serving point of view it isn't. Since Apache usually interfaces to all kinds of modules and programs, the fact that processes die naturally from time to time helps remove cumulative errors.
From the PHP point of view, you can get problems with persistent database connections on a very high load site, that's true. But that's about the only problem. Sure, you can't build a persistent storage of information in the server but that's a minor issue. > But is this really a closest one can get
with apache? None of the other extension libraries for apache, like nsapi, provides the notion of persistent resources shared among all apache requestst?
No. The only way to do it is to get away from Apache processes and use Apache only as an interface to your single process. This is how all Java servlet containers do it. Take a look at Jserv (called mod_jk these days). I once hacked Jserv to work with my C++ application, that was fun. It worked (as a single persistent process) but I have found that the speed was about the same as the CGI version of the same thing (under moderate usage and working with MySQL) that the additional trouble of having a different process that you have to start and monitor, plus make sure that you free memory correctly and handle multithreading - is simply not worth it. (BTW, isn't nsapi the API for the Netscape web server?) Bye, Ivan -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php