Henrik,
Here is my solution :
First clean out the previous install by deleting your "config.cache" files and do a "make clean" . Also delete all instances of the "php.ini" in your file system (usually in "/usr/local/lib" or "/usr/lib").
Now if you previously installed PHP as a static module you'll also have to reconfigure and reinstall Apache.
However if you want to install it as a dynamic module just configure it with the apxs option.
Here is an example setup after you have done the clean up. You should add the configuration options you normally use.
Good luck !
Mo.
extract tarballs
tar zxvf mm-1.1.3.tar.gz
tar zxvf openssl-0.9.6.tar.gz
tar zxvf mod_ssl-2.7.1-1.3.14.tar.gz
tar zxvf apache_1.3.14.tar.gz
tar zxvf php-4.0.3pl1.tar.gz
prepare apache
cd apache_1.3.14
./configure
cd ..
prepare mm
cd mm-1.1.3
./configure --disable-shared
make
cd ..
prepare openssl
cd openssl-0.9.6
./config -fPIC
make
make test
cd ..
prepare mod_ssl (and apache)
cd mod_ssl-2.7.1-1.3.14
./configure \
--with-apache=../apache_1.3.14 \
--with-ssl=../openssl-0.9.6 \
--with-mm=../mm-1.1.3 \
--enable-module=rewrite \
--enable-shared=max \
--enable-rule=SSL_SDBM \
--localstatedir=/var/apache
cd ..
compile apache (and mod_ssl)
cd apache_1.3.14
make
#make certificate
make install
cd ..
prepare php
./configure \
--withapxs=/usr/local/apache/bin/apxs
make
make install
cp php.ini-dist /usr/lib/php.ini
echo "Installation complete"
cd ..