LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-26-2010, 03:34 PM   #1
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
How to get PHP and Apache to work


I wanted to play around with PHP and already have Apache installed, but instead of showing the intended page I just see the PHP source code, despite having tried many of the guides online.
 
Old 04-26-2010, 04:00 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062
You do need to edit your httpd.conf file.

You'll need to add index.php like this
Code:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>
And you'll need to
Code:
# Uncomment the following line to enable PHP:
#
Include /etc/httpd/mod_php.conf
The Include directive may or may not already be in your httpd.conf file -- if so, just uncomment it; otherwise insert a line similar to the above near the end of your httpd.conf (depending upon where your mod_php.conf file actually is).

Then, stop and restart httpd and give 'er a shot. Also, you may need to "force" page reload in your browser (or clear the cache).

Hope this helps some.

Last edited by tronayne; 04-26-2010 at 04:01 PM.
 
1 members found this post helpful.
Old 04-27-2010, 08:18 AM   #3
ninohead
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Rep: Reputation: 0
Hi
This might help you
http://linux.nsguru.com/your-first-f...n-suse-t20.htm


___________________________________-
I shot an arrow in the sky and its stuck
 
Old 04-28-2010, 10:19 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
@tronayne

That worked!
 
  


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
Can't get PHP 5 to work on CentOS 4.2, Apache 2.0.52 tibberous Linux - Server 3 10-27-2007 06:25 AM
how do i install php to work with apache kiganda Linux - Newbie 1 10-05-2007 06:27 AM
PHP 5.1.0 and Apache 2.0.55 don't work together polemon Linux - Software 8 12-04-2005 12:57 PM
installing php to work with apache citrus Linux - Software 8 04-30-2004 02:08 AM
Can't get PHP and apache to work together FrostGunner Linux - Software 3 09-11-2003 11:51 AM

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

All times are GMT -5. The time now is 07:33 AM.

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