PHP Isn't Recognized by Apache?

Hi Everyone,

I’m not sure if this is a PHP issue or an Apache issue - please help!

I recently installed Apache 2.2 on my home machine so that I could get in some PHP practice. I wrote up a php file, “practice.php”, put it in my Document Root, and went to have a look at it through the browser.

Strange thing is, it didn’t read as PHP at all, but just displayed all HTML and PHP text in plain text format. I made the same file, named it practice.htm, and accessed it again. This time, the HTML headers/footers did not show up, and the HTML text displayed correctly, but the PHP did not display at all.

This leads me to believe that my apache server doesn’t support PHP, but I know that’s not the case - must be a configuration issue, I’m just not sure how to resolve it. Posted on Apache forums as well, but no response yet. Any help would be much appreciated.

Thanks in advance!

one question first, i know this is a strange question but i know some people that have done it:
have u accessed the file threw the http protocol instead of threw the filesytem:

now to get closer to the prob. it should only be a configuration issue, i havn’t seen any apache without php for a long time. there should be some ContentType lines in the httpd.conf can u tell us wherther php is included there.

then there should be a line in there loding the mod php can u search for it and see whether it uncommented (has no # in front of it).

if this isn’t returning any results please tell us wath operationg system u are running and what package u tryed to install. or just try another packege xampp is a good one i never had problems with:
but a googlesearch should make u fide some more easyly

Sponsor our Newsletter | Privacy Policy | Terms of Service