I'm running a Ubuntu Server on a VM, to test out different web forum solutions. I have set up a ~/public_html/ to be accessible with the apache2 web server, and that works fine.
However when I go to a .php file on a browser (using my VM's ip-address/~username/phpfile.php) it does not display it as it should. Instead it offers to save to file/asks what program to open it with. Interestingly though that dialog box does recognise that it is a php file.
I have the following version of php installed on the system:
PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
And the following server:
Server version: Apache/2.2.14 (Ubuntu) Server built: Nov 18 2010 21:19:09
If anyone knows what might be causing this/potential solutions it would make me very happy :)
EDIT: Turns out files this behaviour was only apparent on files in the ~/public_html/ directory. All php files in /var/www/ work fine.
Prizes go to whoever can explain why? :D (And by prizes I just mean a well done, no actual prizes I'm afraid.)