You should read the INSTALL file that comes with PHP very carefully before using Apache and PHP . It has instructions that tell you how to make Apache pass PHP scripts to the PHP interpreter. Briefly, you must add lines like the following to your Apache configuration file (e.g. httpd.conf):
AddType application/x-httpd-php5 AddType application/x-httpd-php5 .phtml