Hello,

I am writing a book on PHP with Andrei Zmievski and I asked him a question
on how resources are handled and he suggested posting the question here.

> >Hi Andrei,
> >
> >I am doing the 2nd database chapter and had some problems that I hope you
> >can clarify:
> >
> >1. Are open resources (eg. database link_identifiers) automatically
cleaned up
> >when the page completes,
> >or only when the apache child process dies?
>
> I *think* they hang around for as along as apache child lives, but you may
> be better off asking Zeev or Andi about it.

My suspicion is that persistent resources are only cleaned up when the child
process dies, while non-persistent resources are closed immediately at the
end of the page/script. Does anyone know the correct answer?

If you can spare the time, I would be grateful for an answer to the
following questions too:

2. If resources are not cleaned up until the apache child process dies, what
will happen in multi-threaded servers like Apache 2 and IIS?

3. Are persistent resources locked exclusively by an executing script until
the script completes when the resources become available for other scripts,
or can persistent resources be shared by multiple concurrent scripts?

Thanks for your help,
John Lim








-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to