Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-25-2012, 04:01 AM   #1
LQ Newbie
Registered: May 2012
Location: Hyderabad
Distribution: Ubuntu,fedora
Posts: 3

Rep: Reputation: Disabled
Question PHP code diplayibg ob browser

hi guys,

after upgrading apache 2.0 to 2.22.222 php code is not compiling and on browser it is showing the code.plz help me in this problem.
Old 05-25-2012, 06:31 AM   #2
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: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Sounds like you may not have included one or two things in your httpd.conf; in a text editor, look for php. You should find something that looks like this
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
<IfModule dir_module>
    DirectoryIndex index.html index.php
If the index.php is not there, you want to add it (there needs to be one of those somewhere, it may be added someplace else so look first).

Next, look for
# Uncomment the following line to enable PHP:
Include /etc/httpd/mod_php.conf
Your distribution may have mod_php.conf located somewhere other than in /etc/httpd, you may have to look for it.

If you have changed either of those, be sure to restart httpd.

Hope this helps some.
Old 05-25-2012, 07:11 AM   #3
LQ Newbie
Registered: May 2012
Location: Hyderabad
Distribution: Ubuntu,fedora
Posts: 3

Original Poster
Rep: Reputation: Disabled

thanks tronayne for your reply i will check this things hope it will go correct


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
Yesterday PHP worked just fine and today it wants to serve up the php code. orsty9001 Linux - Server 10 12-12-2008 10:48 AM
php page displaying text that is supposed to be part of php code DragonM15 Programming 9 07-31-2008 04:58 PM
Postfixadmin PHP setup file - only displays PHP code davidmbecker Linux - Software 3 04-17-2008 10:33 AM
php code exposed on browser Swakoo Linux - General 2 02-12-2006 07:01 AM
merge ASP code with PHP code.. possible ?? ALInux Programming 7 12-30-2005 08:40 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:23 AM.

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