You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rasmus Lerdorf <ra...@lerdorf.on.ca> on 1997/10/25 19:40:29 UTC

Initializer

Are we going to call the initializer function twice 'til the end of time?
I am sure it is the most-often asked question from module developers.
It is also a bit tricky that it is the second call to the function that is
the real call.  I find that I have to ignore the first call and just take
the second for things to work correctly.

I recall that someone fixed this *feature* at some point resulting in
mod_perl breaking.

-Rasmus


Re: Initializer

Posted by Ben Laurie <be...@algroup.co.uk>.
Rasmus Lerdorf wrote:
> 
> Are we going to call the initializer function twice 'til the end of time?
> I am sure it is the most-often asked question from module developers.
> It is also a bit tricky that it is the second call to the function that is
> the real call.  I find that I have to ignore the first call and just take
> the second for things to work correctly.

Hang on - how do you survive a restart if you can't take two
initialisations? Admittedly its a pain for some things - I eliminate it
in Apache-SSL to avoid prompting for key passphrases twice, but that
should be the only problem, shouldn't it?

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: Initializer

Posted by Dirk-Willem van Gulik <di...@elect6.jrc.it>.
> It is also a bit tricky that it is the second call to the function that is
> the real call.  I find that I have to ignore the first call and just take
> the second for things to work correctly.
> 
> I recall that someone fixed this *feature* at some point resulting in
> mod_perl breaking.

I tried to fix it, and it indeed stoped mod_perl, fastcgi, include and the
oracle sql module from working :-( the first two for not exactly trivial
reasons. This could turn out to be an expensive legacy problem.

Dw.


Re: Initializer

Posted by Dean Gaudet <dg...@arctic.org>.

On Sat, 25 Oct 1997, Rasmus Lerdorf wrote:

> Are we going to call the initializer function twice 'til the end of time?

Probably.  Would another API phase alleviate the troubles?  Well, you
really shouldn't need it since you can register a cleanup in the pconf
pool which will be called before the second time (unless you're in inetd
mode ;).

Dean