Friday, March 20, 2009

How to configure PHP in Apache (Windows)?

Add the following into your httpd.conf
(Note: Make sure that you have given the correct path in LoadModule)

LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

1 comment:

  1. With the above configuration, some of the functionality in PHP failed in my case.

    The following worked well for me.

    ScriptAlias /php/ "C:/Program Files/PHP/"
    Action application/x-httpd-php "C:/Program Files/PHP/php-cgi.exe"
    LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
    LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll"
    LoadModule php5_module "C:/Program Files/PHP/php5apache.dll"

    ReplyDelete