Item 1: I use Apache as my web server of choice. I use it on the Queens’ JCR web server (which I built from scratch, fairly standard LAMP setup). My hosting provider uses it (I have no input whatsoever into this, but it’s worth mentioning). I also run it on my own box for serious development and general faffing (“faff” in the sense of waste time, not female genitalia).
Item 2: I use PHP as my current web scripting language of choice. Despite some problems I may have with it, it’s popular and it works. This unfortunately leads us to…
Problem A: PHP and Apache 2 don’t play nicely with each other. Up until recently the PHP site carried a severe warning saying “do not use PHP with Apache 2 or your computer will fall over and die in a myriad different horrific and painful ways” or words to that effect. This has thankfully been amended to the slightly more helpful “we do not recommend using a threaded MPM in production with Apache2”. A slightly more verbose explanation is also offered.
(Brief note: one of the main new features introduced in Apache 2 is the concept of a multiprocessing module – a module which allows Apache to run in whatever exciting combination of separate processes and threads it sees fit. PHP doesn’t get on with the default one of these, leaving the possibility of the aforementioned horrific server-death.)
“All well and good,” we say, “just use a different MPM. I’ve heard this ‘prefork’ jobbie works quite nicely”.
apt-get install apache2-mpm-prefork apache2 apache2-common works fine.
apt-get install libapache2-mod-php5 doesn’t. This is because, as PHP5 and Apache 2 have been uncooperative for the life of PHP5, the Debian folks haven’t produced a PHP5 module for Apache 2.
I’m a happy geek. Now I just have to try installing it on the odd web server here and there and hope nothing cocks up in the process.