I maintain an AMP server in my computer; AMP stands for (A)pache (M)ySQL (P)HP. The most common flavor is actually LAMP (for Linux), where a whole server with basic features is built just with free and open source software. However, I’ve never dared to install and use Linux (yet), so I do it in Windows. However, I’m going away from the point.
After I installed from scratch XP past month, I decided to reinstall the AMP server, in a folder called Cherokee as I’ve been doing in the last years (read Sundiver by David Brin). I installed the last Apache 2.2.4, the last available 4.x version of MySQL (as I don’t want to go 5.x yet) and PHP 4.4.6 (same). I installed and configured everything, as I’ve done several times already, and thought that it was done. The next day I wanted to begin production, so I start AMP… And no way. It doesn’t load. I found the dreaded cannot load error in PHP installations:
httpd.exe: Syntax error on line 188 of C:/Cherokee/Apache2/conf/httpd.conf:
Cannot load C:/Cherokee/php/sapi/php4apache2.dll into server: The specified module could not be found.
This error is quite common when configuring PHP with Apache 2.x; there’s a dll php4ts.dll which must be somewhere in the path. Some people copy it to the sapi folder, or copy the sapi dll to the main PHP folder, or place it in a folder which is in the path. Well, I did ALL of them, yet the hatred error kept appearing. I started making all kinds of combinations of it, changing slashes, moving dll’s, expanding the path, to no avail. I searched internet for this error, and all I could find was the same references to php4ts.dll. I spent almost two hours with this. I surrendered, and decided that there was something inherently wrong in the programs. I think some of you might know that feeling: being sure that you’re doing the correct steps, and the fucktard programs not wanting to work.
I decided to change versions, probably going back from Apache 2.2.4 to 2.0.x (which was the last one I installed, a couple years ago). But before I did so, I searched around looking for specific 2.2.4 - 4.4.6 incompatibilities. PHP.net - nothing. Apache.org - nuts. Google… Oh well, Google is a great tool, but you need to know how to use it. Once I realized how to do the search, I saw that Apache 2.2.x and Apache 2.0.x need modules compiled differently. PHP comes with modules compiled for Apache 1.x and 2.0.x, so one would guess that somehow the developers would notice the need for a module compiled for 2.2.x… The answer is yes and no. PHP 5.x comes with a 2.2.x compiled module, but 4.x NOT. WTF, damn it, joder mierdaputa! There’s a serious compatibility issue, namely PHP 4.x can’t work with Apache 2.2.x, and it’s mentioned NOWHERE. If they decided to not support 2.2.x for the 4.x branch, to encourage people to upgrade to 5.x, it’s fine with me, maybe or even probably I would do the same in such situation. But warn about it! There’s nothing in the installation files about that incompatibility, and certainly I saw nothing in the entire PHP site.
PHP is a great piece of software, built with the efforts of hundreds of individuals over the years, but things like these make people kill people. In the end, you can make two things: download an unnoficial binary of the 4.4.6 PHP module for Apache 2.2.x, and use it instead of the one in the PHP package, or downgrade to Apache 2.0.x, which should be enough for everyone (actually 1.3 is the most recommended+stable+secure version). I downgraded. So thanks, PHP Team, for such a great piece of software, but allow me to hate you for a while over a really stupid silly thing…
And to finish the story with a little bit, I spent 15 minutes in the site of MySQL trying to find a download which didn’t include the buy word, until I realized that I wanted the Community edition. They don’t make it to stand out too much…
Notice »« Ten tons of flax