PHP Script Won't Run - Apache2/MySQL Servers Running, PHP Installed - Ubuntu 10.04

I am trying to install a CRM on a Linux (Ubuntu 10.04) laptop to do some testing. Installing the current versions of Apache, MySQL and PHP, and getting the CRM to run is easy. It's when I try to go backwards and run it on a previous set of versions I run into problems. This is what I have done:

I have installed Apache 2.2.14, MySQL 5.0.83, and PHP 5.2.8. When I type something like mysql --version I get back what I would expect: version and distribution info. The same goes for Apache2 and PHP. The Apache server is running and so is mysqld.

So when I go to my browser and look at http://localhost/<CRM dir>/install.php Firefox offers to open the PHP file or save it, as if it doesn't recognize the file. What should happen is that I should get a welcome page and the installation wizard for this CRM distribution should start. I have tried so many different things I probably screwed up something along the way. I have restarted the servers over and over, and even recompiled the versions of MySQL and PHP with no problems. I am hoping I am overlooking something simple because I am lost. Any help is appreciated.


Solution 1:

Make sure your Apache has the proper PHP integration configured somehow.

LoadModule php5_module /some/path/to/modules/libphp5.so
AddHandler php5-script .php
AddType text/html .php
DirectoryIndex index.php

Solution 2:

I rebuilt (recompiled) PHP and restarted the Apache2 server and it worked. I am having a different problem, but perhaps requires a new question.