Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
configure: error: Invalid Apache directory - unable to find httpd.h under /usr/local/apache2/
выдает на
./configure --with-mysql --with-curl --with-apache=/usr/local/apache2/
мое предположение что php5.1.2 не работает с apache2.