LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-25-2008, 06:55 AM   #1
wassimdarwich
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Rep: Reputation: 0
Configuring Apache with PHP


Hi:
I installed PHP5 with apache 2 ,but apache cant read php ,
Any body have an idea how to configure apache to read php?
I appreciate any help .
Thanks in advance.
 
Old 11-25-2008, 11:59 PM   #2
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 573

Rep: Reputation: 61
Have a look in /etc/http/conf.d for a file called php.conf. If you don't have one, create it and put this in it:-
Code:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
If that fails, you could always visit http://www.apache.org.
 
  


Reply



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 and PHP home_art Linux - General 1 04-11-2007 10:54 PM
configuring apache, php mjl3434 Linux - Software 4 09-22-2005 06:49 PM
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 - Distributions > Fedora

All times are GMT -5. The time now is 07:26 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