[csw-users] Why has php been split into a bazillion packages?

Robert Stampfli rob at colnet.cmhnet.org
Thu Dec 8 18:59:18 CET 2005

First, thanks, Mark, for your very quick and comprehensive reply
to my earlier email to the list.  If I may make a suggestion,
you should place a copy of that response under the "View news and
info" tab for mod_php.  I was not aware that mod_php had become a
placeholder for the entire php hierarchy (and, frankly, I'm not
even sure what I should have done to become aware of the fact).
I've used Blastwave's PHP for years, and suddenly it just
ballooned into all these packages.  I presumed it was to provide
for some flexibility in tuning it for the extentions needed, but
the dependencies were such that everything seemed to still be

So, you're saying the first thing I should do is 'rmpkg CSWphp'
and then I can pick and choose among the extensions to suit my
specific needs?  Aside from the physcial package size, is there
any way to discern what effect each extension has on the apache
module size?  I did notice the huge increase in the apache virtual
memory footprint after installing php initially.  Most of that
increase appeared to be confined to two rather large (about 65Mb
each) shared memory segments.  Can you shed some light on what
these segments are and which extension(s) require them?  I'll
play around with "tuning" out the PHP extentsions I don't need,
but if you have additional information about which extensions
are the memory hogs, I'd appreciate it if you would share it
with us.

Thanks again for your quick response,

On Thu, Dec 08, 2005 at 07:57:24AM +0000, Mark Round wrote:
> It's been done for several reasons, mainly due to the size of the  
> original package. PHP was originally built as a monolithic package,  
> with a single .so file to be loaded into Apache. This one .so file  
> contained all the extensions, bloating it's size and meaning that the  
> average user, who may only use a fraction of those extensions was  
> paying the price by running a very large sized Apache process. The  
> footprint really started to hurt on high-traffic sites with lots of  
> Apache processes running. Then there was the issue that it was  
> impossible to upgrade an extension (for instance, relinking the  
> postgresql extension to a new version when one is released) or add a  
> new one without updating the entire package.
> For a first time user running "pkg-get -i php", it was a time- 
> consuming experience, as it would download every dependency for all  
> the extensions in addition to PHP itself. You'd end up with what  
> seemed like half the Blastwave distribution installed just so you  
> could run PHP - PostgreSQl and MySQL libraries, OpenLDAP, OpenSSL,  
> XML libraries, etc.
> The decision was taken to split as many extensions as possible out  
> into separate PHP loadable modules, which gives the end user the  
> flexibility to install only what they want (this is also the way  
> pretty much every other Unix or Unix-like distribution handles PHP).  
> They've also then got the ability to add new extensions or upgrade  
> existing ones without re-doing the whole lot.
> For compatibilities sake, the old PHP package was turned into a  
> "dummy" package that emulated the old behaviour - if you install  
> CSWphp (mod_php), you'll also download and install all the extensions  
> (the 18 other packages you mentioned), and also any dependencies for  
> those packages. So this will still download and upgrade everything  
> which will still be time-consuming. This is also what happened when  
> anyone upgraded from the old monolithic package - because there is no  
> way to tell in advance what extensions a user may be using, in order  
> to avoid random breakages by not having modules available, an upgrade  
> to the modular system would still have downloaded everything -  
> although now, the user can remove what they don't need and tailor the  
> system going forward.
> If you remove the dummy CSWphp package, you can then just upgrade  
> only what you need next time. Is this a problem for you because you  
> have every one of the 18 extensions installed ?

More information about the users mailing list