Section 2. Installing PHP for Apache Web Server

Documentation Link

After you have downloaded the php binary installation package, extract all the contents of the zip file to where you want to install PHP. Chose C:\php.

Copy the file php4ts.dll from the directory you just put the files in to your Windows directory, usually C:\winnt in Windows NT and 2000 and c:\windows in Windows XP.

Open the file httpd.conf in notepad. This file is in the Apache\conf subfolder of where you installed Apache.

Add these two lines to the very end of the file.

Code:


LoadModule php4_module "c:/php/sapi/php4apache.dll"
AddType application/x-httpd-php .php .phtml

Save the file and exit Notepad.

stop Apache webserver
Start Apache webserver

If you don't see "The Apache service was started successfully" then you have made a typo in httpd.conf.