Apache not invoking PHP to translate PHP pages

Discussion in 'Apache' started by jcobban, May 24, 2012.

  1. #1
    I am installing a new machine running Ubuntu 12.04 and the LAMP stack. After installing all of the features when I access PHP pages on the server they are not processed, but rather presented as .php to the browser (that is with MIME text/php rather than text/html). I am not an Apache guru so I understand very little of the configuration files for either Apache2 or PHP. The only change I made to the configuration files was to redirect the root web directory to /home/userid/public_html.

    I would appreciate some suggestions as to what information to collect to understand what is going on.
     
    jcobban, May 24, 2012 IP
  2. Harijith

    Harijith Peon

    Messages:
    20
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I guess the php is not installed correctly. Please paste the output of the command php -v to check if its installed correctly. Also check the error log to get a clue on what the problem is.
     
    Harijith, May 25, 2012 IP
  3. jcobban

    jcobban Greenhorn

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    php -v
    PHP 5.3.10-1ubuntu3.1 with Suhosin-Patch (cli) (built: May 4 2012 02:20:36)
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

    The only thing in the error log is:

    [Fri May 25 11:19:45 2012] [notice] Apache/2.2.22 (Ubuntu) mod_jk/1.2.32 PHP/5.3
    .10-1ubuntu3.1 with Suhosin-Patch configured -- resuming normal operations

    This is my first time installing LAMP on Ubuntu 12.04, which means using the Ubuntu Software Centre rather than Synaptic. I am going to give up, uninstall apache/php etc and reinstall using tasksel.
     
    jcobban, May 25, 2012 IP