[php-maint] [PATCH] New way to handle extensions

Raphael Geissert atomo64+debian at gmail.com
Mon May 28 21:52:21 UTC 2007


I've made some modifications to the debian/ files of the php5 source
package which are intended to provide a new way of handling the
The current model is /etc/php5/SAPI/conf.d -> ../conf.d
My proposition is to make /etc/php5/SAPI/conf.d real directories (not
symbolic links) the same way the apache site/mods-enabled directories.
So, in order to enable an extension, a symbolic link to
/etc/php5/conf.d/extension.ini should be placed in the SAPI/conf.d

After applying the attachment you will find two new scripts under
debian/: php5enext and php5disext; which provide a similar
functionality like apache2's a2enmod/a2dismod

I've added helpful information to the scripts, and some useful usage methods.
Also, I already made the necessary changes to the postinst scripts to
make the transitions between the old model to the new one.

And finally (I hope I'm not missing anything ;-) ), I also added a
per-extension postrm script template that causes all the symbolic
links to be removed, preventing all those php5 warnings about missing
extensions. And of course, all the other minor changes like: removed
the .links template, modified the SAPI's info on the control file to
make them pre-depend on php5-common because this is the package that
ships the php5enext and php5disext bash scripts.

I hope that my modifications will be used in future versions of the
php5-* packages. This approach is the best I could find to solve the
current problems caused by the .ini files being conffiles.

Of course this modification also provides a way to enable/disable
extensions in a per-SAPI basis.

Feel free to contact me.
By the way, on any reply or message related to my modifications please CC-me ;-)

Note about the attachment: the modifications were made against php5 5.2.2-1

Atomo64 - Raphael

Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: php5-newextman.diff.gz
Type: application/x-gzip
Size: 2570 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20070528/26fb1055/attachment-0001.bin 

More information about the pkg-php-maint mailing list