PapaScott I like big blogs and I cannot lie! 🐘

An Axe for the Toolbox

I'm unlucky enough to have to maintain internal web servers on a few outdated Linux boxes, with various versions of Red Hat, Suse, and Mandrake. Trying to keep Apache and PHP current on them is a nightmare, since current RPM packages are not available for old distributions. (MSSQL admins learned over the weekend how important it is to keep your servers current.) And I simply do not like the way Mandrake packages Apache (with separate servers with and without mod_perl).

Building my own RPMs would be silly, since I only have one of each box, so I would still have to compile 5 different Apaches. I have been using ApacheToolbox to try to keep things somewhat organized. But compiling a current PHP on an older box with ApacheToolbox is still a nightmare, since 1) it installs PHP as a static module, so updating PHP means updating everything, and 2) PHP gets confused about which libs (system or ApacheToolbox) to link. Given that my boxes are busy with other tasks, trial and error with PHP/Apache compiles takes literally hours.

Today I happened upon a solution. Compile ApacheToolbox without PHP, then compile PHP as a dynamic module with apxs. ApacheToolbox without PHP compiled and installed cleanly on all boxes, and since PHP only looked for system libraries, it was easy to sort them out. I was able to update all my boxes with various PHP extensions before noon.

Doing this under FreeBSD is much easier, thanks to the ports.

comments powered by Disqus