problem for php enviroment on winXP
Moderator: General Moderators
problem for php enviroment on winXP
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.
Re: problem for php enviroment on winXP
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
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
Re: problem for php enviroment on winXP
I just changed a little bit. Now the browser just displayed php code not executed. why is that. Thank you
Re: problem for php enviroment on winXP
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 -
You would have had much easier time if you had downloaded the executable installer for PHP which does this for you.
Code: Select all
PHPIniDir "/php/directory/here"
LoadModule php5_module "/path/to/php5apache2_2.dll"