BTW, I'm investigating Fedora's php package. They use ./configure --with-config-file-scan-dir=%{_sysconfdir}/php.d, so registering the PHP
extensions is pretty easy. I think we could mimic apache2's layout:
/etc/php5/apache/mods-available/500mysql.ini = config file installed from
Debian package
/etc/php5/apache/php.d/500mysql.ini = symlink created by php5-modconf or
simply by postinst script
I'm not sure if the "mods-available" is good name... We could also rename
"php.d" to "conf.d" like for apache and apache2 packages.
As you can see, there is PHPSAPI and priority in the pathname. Some extensions
work only with a few SAPIs. Some extensions are depending on other
extensions, so priority is the must.
Last, but not least: php5 package installs /etc/apache/conf.d/php5.conf file.
This is the problem related to any apache's modules. The problem appears if
package is removed but conffile still remains. Remember that we have 4
flavours of Apache server
(/etc/{apache,apache-ssl,apache-perl,apache2}/conf.d) and I think we
shouldn't provide just one config file for 4 servers.
Should be start the new tread about this issue?