Can't open php files served from ubuntu/apache

Posted on 2011-04-20
Last Modified: 2012-05-11
I've got ubuntu 8 that I just installed apache2 and php5. I can load html files fine from the server but whenever I try to load a php file it says "what should firefox do with this file?" and wants to save it as a file. I have looked everywhere and tried everything. How can I get php files to open correctly?
Question by:steiner470
    LVL 4

    Expert Comment

    Are you trying to open the file directly, or going to http://servername/filenam.php?
    is PHP actually up and running on the server?
    LVL 4

    Expert Comment

    try sudo a2enmod php5

    also add index.php file, and try simple php script after
    LVL 4

    Accepted Solution

    also check /etc/apache2/sites-available/

    your directory settings must be like this:

          <Directory />
                Options FollowSymLinks
                AllowOverride All
                Order allow,deny
                Allow from all

    Author Closing Comment

    Well done, that fixed it

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now