Installing Apache and PHP on Windows

Yesterday was the first time I installed apache and php on windows! The apache 2 installer worked out of the box, but I had 2 annoyances with php.

I decided to do the manual install, as recommended. Following all the steps was easy, but to get it to work, I had to make the following changes:

  1. The LoadModule directive needs to specify the sapi subdirectory, so if the files are in C:\php, the correct directive in httpd.conf should be
    LoadModule php4_module "c:/php/sapi/php4apache2.dll"
  2. I needed the gd extension, so I uncommented the extension=php_gd2.dll in (a copy of php.ini-recommended), but that was not good enough. I had to modify the extension_dir setting in php.ini to point at the extensions subdirectory, e.g. extension_dir = "c:/php/extensions". After restarting apache everything worked as expected.

Leave a Comment

You must be logged in to post a comment.