RE: [PHP-DEV] Module startup/shutdown in PHP extensions
| From: | Peter Dishman | Date: | Fri, 19 Jul 2002 13:30:57 +0000 |
| Subject: | RE: [PHP-DEV] Module startup/shutdown in PHP extensions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-86028@lists.php.net to get a copy of this message | ||
Ahh, that would probably explain it. My test (not a very good one)
wouldn't have shown the fact that the startup function was being called
twice.
I was just worried that when I came to use these functions for something
important I would have found everything deleted by the shutdown function
straight away.
thanks for your help.
Pete Dishman
-----Original Message-----
From: George Schlossnagle [mailto:george@omniti.com]
Sent: 19 July 2002 14:26
To: Jon Parise
Cc: David Eriksson; Pete Dishman; php-dev@lists.php.net
Subject: Re: [PHP-DEV] Module startup/shutdown in PHP extensions
I believe this is because when apache does it's intial configtest run as
part of start (to validate it's config), it has to do a complete startup
(otherwise it wouldn't know about conf params used by modules loaded as
DSOs. So you see a startup; shutdown; startup.
On Friday, July 19, 2002, at 03:59 AM, Jon Parise wrote:
> On Fri, Jul 19, 2002 at 07:42:41AM +0200, David Eriksson wrote:
>
>>> Now the problem is when I start apache (net start apache) php seems
>>> to call
>>> the module startup function and then it calls the module shutdown
>>> function
>>> immediately afterwards. The request startup and shutdown functions
>>> seem to
>>> work as expected, i.e. they get called when I make a request to
>>> apache.
>>>
>>> If I then stop apache (net stop apache) the module shutdown function
>>> gets
>>> called as expected. It's just when starting that the problem
>>> occurs. Is
>>> this the expected behaviour and if so is there anyway of telling in
>>> the
>>> module shutdown function if the module really is shutting down or
>>> have I
>>> done something completely wrong?
>>
>> I have seen this behaviour too, I guess PHP just works this way, it
>> calls
>> the module startup and shutdown function pair once on initilization.
>
> I'm only guessing, but that may occur when Apache does it's initial
> fork(s). It's been a while since I worked with the Apache module API,
> though.
>
> --
> Jon Parise (jon@csh.rit.edu) . Information Technology (2001)
> http://www.csh.rit.edu/~jon/ : Computer Science House Member
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
// George Schlossnagle
// Principal Consultant
// OmniTI, Inc http://www.omniti.com
// (c) 240.460.5234 (e) george@omniti.com
// 1024D/1100A5A0 1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100 A5A0