Apache is not processing the PHP file

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
mr palford
Forum Newbie
Posts: 2
Joined: Fri May 23, 2008 10:27 am

Apache is not processing the PHP file

Post by mr palford »

I know this question has been asked numerous times but even after spending an afternoon following several different sets of directions and debugging advice I'm still stuck.

I installed Apache 2.2.8 and PHP 5.2.6 on my dell Latitude lap top.

I created a simple php test file called info.php and placed it in the Apache htdocs directory.
<?
phpinfo();
?>
I request the page with http://localhost/info.php
Apache returns a blank screen. If I view the source with the browser I see the php code. Apache does not know what to do with a php file and is delivering the file as the response rather than processing it.

What I've tried:
First of all, the PHP install added the following to httpd.conf
PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"

I added:
AddType application/x-httpd-php .php .php5

What is missing?

Thanks for any help or guidance,
beeky
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Apache is not processing the PHP file

Post by VladSun »

Did you restart the apache service after you edited its config files?
There are 10 types of people in this world, those who understand binary and those who don't
mr palford
Forum Newbie
Posts: 2
Joined: Fri May 23, 2008 10:27 am

Re: Apache is not processing the PHP file

Post by mr palford »

I figured out what was wrong by looking through the archives of this forum. The problem was my usage of the 'old' php style <?...?> insead of <?php...?> in my php test program.

Thanks to all who responded,
-=beeky
Post Reply