Making Apache 2.x with custom-built PHP 4.x happy on FC3 with no original PHP RPMs installed

After uninstalling original PHP 4.x RPMs on FC3 and install a custom-built version, I’ve discovered that our PHP applications don’t work when I try to use them, instead a directory listing or the contents of the PHP files are displayed. This probably has to do with the fact that httpd.conf was updated after removing native FC3 PHP 4.x RPMs to not recognize php files in general and index.php in particular. Adding php.conf to /etc/httpd/conf.d with the following contents solves the problem:

LoadModule php4_module  /usr/lib/httpd/modules/libphp4.so

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php