./configure --prefix=/usr/local/php-4.2.3 --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/apache/conf/ --with-xmlIf we want to add support for MySQL or Postgres, or both of them we have to add the lines:
--with-mysql=/usr/local/mysql/ --with-pgsql=/usr/local/pgsql/
This will prepare the php source to install php as a DSO. So when the configure command ended, we have to start the compilation:
make make install cp php.ini-dist /usr/local/apache/conf/php.ini
This will only generate the apache module of php4 as DSO, but this process will not generate a php binary. If we want to generate a php binary we have to reconfigure the php sources, deleting any reference to apache:
./configure --prefix=/usr/local/php-4.2.3 --with-xml
This will prepare the php source to install php. So when the configure command ended, we have to start the compilation:
make make install
By this way we will generate a php binary in the directory /usr/local/php-4.2.3/bin/
Now we only have to add the following line to the httpd.conf of apache configuration file (only if they don't exists yet):
LoadModule php4_module libexec/libphp4.so AddType application/x-httpd-php .php .html
With the second line (AddType line) we say that the pages with .html suffix are going to be passed through the php module.