Question: On my new Ubuntu system, I've managed to get Apache2 up and running for developing my ZendFramework Web Applications...

I've got my `available-sites` config working correctly because I am able to request `localhost` and it servers up the correct `index.html` from my specified directory. 

**Problem :** if I request `index.php`, firefox attempts to download the file instead of running the script.

Any Ideas why this would happen? 

I've added the following to `httpd.conf` but it hasn't helped. 

```
AddHandler application/x-httpd-php .php5 .php4 .php .php3 .php2 .phtml

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

```

Answer: 
If you are using userdir (http://localhost/~user/phpinfo.php) you will want to:

```
vi /etc/apache2/mods-enabled/php5.conf

```

Change

```
<IfModule mod_userdir.c>
   <Directory /home/*/public_html>
       php_admin_value engine Off
   </Directory>
</IfModule>

```

to comment the php\_admin\_value

```
<IfModule mod_userdir.c>
   <Directory /home/*/public_html>
       #php_admin_value engine Off
   </Directory>
</IfModule>

```

then

```
service apache2 restart

```
For me, the solution was to create the following 2 symbolic links:

```
ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php5.conf
ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled/php5.load

```

and to restart Apache:

```
/etc/init.d/apache2 restart

```

Hitting the `http://my_server/test.php` file, which has contents:

```
<?php
   phpinfo();
?>

```

came right up, and the browser didn't try to download the php file. Didn't have to restart the browser, either.