3) Compiling and Installing PHP 
From the shell, type the following:
cd /usr/local/src/php-xxx
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --with-mysql --with-apache=../apache_xxx
make
make install
Now PHP 4 is installed and we are ready to compile and install Apache.
User Contributed Notes: 3) Compiling and Installing PHP Add a Comment