I've just set up Apache2 on my Ubuntu 11.10 machine. I'm observing a difference with regard to index.php files depending on how I access the server. If I use a URL of
http://192.168.2.5/someFolder/
I am presented with the index page generated by the index.php file I placed in someFolder. If on the other hand I use a URL of
http://localhost/someFolder/
I am prompted with a download dialog. If I proceed with the download I'll obtain a file containing the unprocessed PHP from index.php. Attempting to use the URL
http://localhost/someFolder/index.php
Also results in the download dialog, but with a different default name for the file. Finally, if I copy "index.php" to "toc.php" and use a URL of
http://localhost/someFolder/toc.php
The page displays correctly, just as index.php did when accessed via the IP number. As I was composing this message I came up with one more experiment to try. If I use "127.0.0.1" instead of "localhost" the index file is displayed correctly.
Thanks in advance.