problem for php enviroment on winXP

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
sdnd2000
Forum Newbie
Posts: 2
Joined: Sat Mar 20, 2010 10:28 pm

problem for php enviroment on winXP

Post by sdnd2000 »

Hi, I am beginner and starting to config the windows environment. I just download PHP5.3.2 and apache 2.2. I followed the instruction to config everything. But when I used localhost to test php file, the browser just wanted download it. I do not know why. Thanks for telling me.
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: problem for php enviroment on winXP

Post by mikosiko »

most likely your apache configuration is incomplete... in the apache configuration file look for the directive
DirectoryIndex it probably is written in this way:

DirectoryIndex index.html just add index.php

also in the same configuration file look around the end of it and be sure that the PHP configurations lines has been included (3 or 4 lines)...

check everything and after that restart apache and test
sdnd2000
Forum Newbie
Posts: 2
Joined: Sat Mar 20, 2010 10:28 pm

Re: problem for php enviroment on winXP

Post by sdnd2000 »

I just changed a little bit. Now the browser just displayed php code not executed. why is that. Thank you
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: problem for php enviroment on winXP

Post by Eran »

Setting the DirectoryIndex is just a convenience method, it is unrelated to parsing PHP. You need to load the PHP module provided by your PHP installation -

Code: Select all

PHPIniDir "/php/directory/here"
LoadModule php5_module "/path/to/php5apache2_2.dll"
You would have had much easier time if you had downloaded the executable installer for PHP which does this for you.
Post Reply