Wednesday, January 31, 2007

Simplest way to configure Apache Http Server with PHP

Product Version: Apache Http Server 2.2, PHP 5.
Non-install version of php is used.
Modify file /conf/httpd.conf by adding the following lines:

LoadModule php5_module "C:/php5/php5apache2_2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php5"

C:/php5 is the location where php5 is installed.

Modify php.ini by specifying:

doc_root ="C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"

No comments: