Find the answer to your Linux question:
Results 1 to 4 of 4
HI, please excuse my possibly noob question. I am trying to install LAMP to a centos 5 machine (apache 2.2.) Everything seems to have installed ok, and I have tried ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    2

    How to Add PHP to httpd.conf


    HI, please excuse my possibly noob question. I am trying to install LAMP to a centos 5 machine (apache 2.2.) Everything seems to have installed ok, and I have tried adding lines into the httpd.conf file to get it to read PHP. I cant remember the exact lines, but one was a "Load Module" and another was "Addtype application", and also a "directoryindex" line. Anyway, after making these alterations, I am still not able to load the php test page. DO i need to do anything else? can someone tell me the corrected modifications to make to the http.conf file? thanks
    Also... the php installation seems to have both php 4 and 5... is php 5 back compatible, or do i need both? do i then need to modify the httpd.conf file for both?

  2. #2
    Just Joined!
    Join Date
    Oct 2008
    Posts
    31
    root@posix:~# cat /etc/httpd/httpd.conf | grep -i include | grep -i php
    Include /etc/httpd/mod_php.conf


    Make sure that line is uncommented.

  3. #3
    Just Joined!
    Join Date
    Oct 2008
    Posts
    2

    sorry

    that line doesnt exist, infact, nothing in the httpd.conf file mentions php

  4. #4
    Just Joined!
    Join Date
    Oct 2008
    Posts
    31
    post the stdout from this:

    Code:
    ls -R /etc/httpd/ | grep -i php

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •