I like the idea of compiling DSO modules for Apache. It allows me to turn
on or off things we may or may not need at a given time (like mod_ssl,
mod_auth_mysql, mod_auth_ldap, etc.) and also allows me to compile in new
versions of modules without having to rebuild Apache from scratch.
Now, when I build PHP, I tend to put in a lot of things. Like:
../configure --with-mysql=/usr --with-openssl --with-pdflib=/usr/local --with
-bz2 --with-mhash --with-mcrypt ...
etc. etc. All of these modules are things that we use, but some of them not
very frequently.
So I'm trying to learn more about PHP's dynamic extensions. I didn't even
know that they existed, until I looked at the php.ini and phpinfo() output
of the PHP version that comes with RedHat 9.0. I see that instead of doing
things like:
./configure --with-mysql=/usr
they do
./configure --with-mysql=shared,/usr
So I guess my questions are:
1) Where can I learn more about PHP dynamic extensions? Maybe I'm looking
in the wrong places, but the documentation on them seems to be quite light.
2) Can *any* module be compiled as a dynamic extension, just by putting
"shared" in the appropriate place in the ./configure command? Or just a
few? How can you figure out which ones can, and which ones can't?
3) What are the advantages and disadvantages to making dynamic extensions?
I'm guessing that advantage=small er core PHP and disadvantage=sl ower initial
load time. Is that right? Anything else?
4) Similar to #3, is building dynamic extensions whenever possible
considered a Good Thing? Or are most people just still building everything
into a single monolithic libphp4.so ?
Thanks!