Jump to content

[SOLVED] How to add PHP to Httpd.conf


Recommended Posts

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?

Link to comment
Share on other sites

yes, i did restart apache... which has also caused some confusion, as it seems fickle about restarting if incorrect lines have been entered into the .conf (ie. wont start), but playing around with a few peoples lines, it now starts ok, but with the same results.

Link to comment
Share on other sites

yes, I installed via yum, although... for this installation, i installed the apache and mysql via the os installer. Although, previously, i tried to install all via yum. Either way, when PHP was installed, it did not write to the httpd.conf file. I dont suppose the order in which they are installed would matter?

Link to comment
Share on other sites

Pardon my ignorance but, what exactly is the os installer? I'm a Debian user.

 

The order in which the components where installed does not matter, though if they where all done via yum any dependency issues and configuratiosn ought be taken care of. That is assuming yum does helf the job of apt-get which I'm sure it should.

 

Either way. For us to be able to help you were going to need to see what modifications you made to what files.

Link to comment
Share on other sites

sorry, all i meant was that i installed those services during the installation of the os. In regards to knowing what lines I have added to the httpd.conf file... it might be easier to assume that I havnt modified it at, as I have an unmodified backup of the file.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.