12.7 Setting up PHP

To inform Apache to load mod_php at startup time, httpd.conf must be edited and the following must be typed in:

LoadModule php4_module        libexec/libphp4.so

underneath the Dynamic Shared Object (DSO) Support section. PHP may have already done this for you. Also, Apache must know when to use the mod_php module, therefore you will need to add this in the relevant section:

AddType application/x-httpd-php .php .phtml .php4 .php3

One may also wish to edit the DirectoryIndex directive in httpd.conf to:

DirectoryIndex index.html index.php index.phtml index.php4 index.php3

At this point, everything is all set. Restart Apache and view the error log to confirm the installation was a success.