I'm having trouble compiling PHP 5 (I've tried 5.0.4, 5.1.2 and 5.1.6) for Apache 2.0.53.
Here is my configure script:
./configure --with-apxs2=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml \ --with-config-file-path=/usr/local --with-pear --enable-sockets --enable-track-vars \ --enable-versioning --enable-force-cgi-redirect --disable-cgi --with-gettext --with-mysql \ --with-gd --with-zlib-dir=/usr
It compiles fine and I do a 'make install' to drop the 'libphp5.so' module into my Apache 2.0 modules dir, and when I try to start Apache, I get the error message:
Starting httpd: Syntax error on line 190 of /etc/httpd/conf/httpd.conf: API module structure `php5_module' in file /usr/lib/httpd/modules/libphp5.so is garbled - perhaps this is not an Apache module DSO?
Which I've read means that apparently I'm compiling the Apache module for the wrong version of Apache (presumably 1.3x). I can't for the life of me figure out why it thinks I want an Apache 1.3 PHP module...
It's certainly worth noting that this server did previously have Apache 1.3something and it was recently upgraded to 2.0 in order to support PHP5. After struggling through quite a bit of trouble building and installing Apache, I'm now stuck on the PHP module.
I see a very real possibility that something (eg. the path to apxs) is still pointing to an old Apache 1.3 version of some binary, but it looks to check out to me, and I'm not sure how the machinery of the make script determines what version of Apache to build the module for...