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:
- The
LoadModuledirective needs to specify the sapi subdirectory, so if the files are inC:\php, the correct directive inhttpd.confshould be
LoadModule php4_module "c:/php/sapi/php4apache2.dll" - I needed the gd extension, so I uncommented the
extension=php_gd2.dllinphp.in(a copy ofphp.ini-recommended), but that was not good enough. I had to modify theextension_dirsetting inphp.inito point at the extensions subdirectory, e.g.extension_dir = "c:/php/extensions". After restarting apache everything worked as expected.