What could be causing a PHP page to be downloaded instead of displayed?

This issue could be caused by the server not recognizing the PHP code within the file. To solve this, you need to ensure that the server is configured to interpret PHP code. This can be done by checking the server configuration file (such as Apache's httpd.conf) to make sure PHP is enabled and the correct handler is set.

AddHandler application/x-httpd-php .php