LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-10-2005, 07:56 PM   #1
LinuxStart
Member
 
Registered: Nov 2004
Distribution: Shrike
Posts: 55

Rep: Reputation: 15
Configuring PHP with Apache.


Hi i have installeed php5 with apache2 but when i try to run the test page, it simply shows up as an html page, with all the php code, just showing as code, any idea how to fix this.

Thank you
 
Old 07-10-2005, 08:00 PM   #2
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
Make sure the second line here in your /etc/apache/mod_php.conf file is uncommented:

# Load the PHP module:
LoadModule php5_module libexec/apache/libphp5.so
 
Old 07-10-2005, 08:53 PM   #3
LinuxStart
Member
 
Registered: Nov 2004
Distribution: Shrike
Posts: 55

Original Poster
Rep: Reputation: 15
I have

LoadModule php5_module modules/libphp5.so

but this does not work, i have also tried your way and that doesn't work either.

Plz help.
 
Old 07-10-2005, 09:01 PM   #4
LinuxStart
Member
 
Registered: Nov 2004
Distribution: Shrike
Posts: 55

Original Poster
Rep: Reputation: 15
I dont have a mod_php.conf in my usr/local/apache2 folder

Last edited by LinuxStart; 07-10-2005 at 09:42 PM.
 
Old 07-10-2005, 10:53 PM   #5
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
Try typing "locate mod_php.conf", the file should be in the /etc/httpd/conf directory. That is where all the configuration files are, if you problem isn't in that file, it could be with httpd.conf in the same directory.
 
Old 07-11-2005, 04:36 AM   #6
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
aswell as the loadmodule line you need
Code:
AddType application/x-httpd-php .php
both in your httpd.conf file, you don't need a mod_php.conf file

Last edited by phil.d.g; 07-11-2005 at 04:38 AM.
 
Old 07-11-2005, 09:15 AM   #7
LinuxStart
Member
 
Registered: Nov 2004
Distribution: Shrike
Posts: 55

Original Poster
Rep: Reputation: 15
i added both lines, but it still doesnt work, im putting the test info php page
in /var/www/html/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configuring php for apache PennyroyalFrog Linux - Newbie 3 02-07-2008 11:58 PM
configuring apache, php mjl3434 Linux - Software 4 09-22-2005 06:49 PM
Configuring Apache, PHP AND mySql Stryks Linux - Newbie 2 10-14-2004 02:02 AM
Configuring php on apache Dakkar Linux - Software 5 06-01-2004 09:26 AM
Configuring Apache and PHP... causticmtl Slackware 2 07-06-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration