My guess is that your mime-types are wrong/missing:
Have you checked if you have this file: /etc/apache2/modules.d/70_mod_phpX.conf? (or something similar)
If not try creating it, but call it 70_mod_php5.conf (if you are using php5):
Code:
<IfDefine PHP5>
<IfModule !mod_php5.c>
LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule mod_mime.c>
AddType application/x-httpd-php .php # If the file is there, just make sure this is present
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php5
AddType application/x-httpd-php-source .phps
</IfModule>
AddDirectoryIndex index.php index.phtml
</IfDefine>
If you're using php4, there should be a similar file, but with references to php4 instead (obviously).
There's also a possibility you might have to fill this in your httpd.conf if the modules folder isn't present.
If, on the other hand, the file is there, AND the content is the same as above then you have to make sure you've got APACHE_OPTS set with "-D PHP5" (or -D PHP4 if you're using php4). Although if OPTS is wrong, it's very strange that .html files with php content works.
Hope this helps. But if not, please post your version of Apache and PHP?