Hello,
I'm hearing some conflicting reports and I'd like to see other's thoughts on
this.
Loading an external module using dl() at runtime obviously loads the module
per request (ie, performance hit).
On the other hand, which I believe is the recommended method anyway, is using
the extension= directive in php.ini. While this is still a dynamic module
load, it should only happen once; for instance when the Apache child process
is forked. However, while reading some Zend API docs I began to doubt this,
so I'm interested in some confirmations.
Basiclly, I'm of the understanding that dl() is 'bad' anyway, so I guess the
question really is: when specifying a dynamic module (.so) from php.ini, does
it get loaded per request or at process creation time?
Thanks,
H
Hello Hans,
Basiclly, I'm of the understanding that
dl()is 'bad' anyway, so I guess the
question really is: when specifying a dynamic module (.so) from php.ini, does
it get loaded per request or at process creation time?
Per process creation.
Derick
--
"my other box is your windows PC"
Derick Rethans http://derickrethans.nl/
PHP Magazine - PHP Magazine for Professionals http://php-mag.net/
On the other hand, which I believe is the recommended method anyway, is using
the extension= directive in php.ini. While this is still a dynamic module
load, it should only happen once; for instance when the Apache child process
is forked. However, while reading some Zend API docs I began to doubt this,
so I'm interested in some confirmations.
Not sure what you are reading, but yes, if you use extension=foo.so in
your php.ini file, then foo.so is only loaded at server startup time.
However, due to funky Apache startup stuff, it is actually loaded,
unloaded and then loaded again at startup, but from then on there is no
per-request loading or unloading as there is with dl().
-Rasmus