LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   PHP code diplayibg ob browser (https://www.linuxquestions.org/questions/linux-newbie-8/php-code-diplayibg-ob-browser-946778/)

jkd 05-25-2012 04:01 AM

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.

tronayne 05-25-2012 06:31 AM

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
Code:

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

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
Code:

# 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.

jkd 05-25-2012 07:11 AM

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


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