Installing PHP 5 and Apache 2.2 on Vista

Sometimes you want to get things done right and sometimes you just want to get them done. When you’re installing a PHP 5 and Apache 2.2 development setup on Windows Vista using the automatic installers, it may seem like neither one of these is an option. This quick tip is going to save you a lot of time and trouble.

If you’re setting up a development system on Vista using the PHP and Apache installers my guess is that you’re looking for ease over that smug feeling of accomplishment that comes from manual installs. You’ve probably gotten Apache installed and working, but when you throw PHP into the mix it all comes to a screeching, cataclysmic halt.

You may not know it yet, but the problem is two fold. The PHP installer cannot update the apache httpd.conf file and several files aren’t getting copied to the PHP directory. You are probably aware of the former issue since it produces and error message, but you may not have yet discovered the latter.

Since this is a quick tip, let’s get right to the solution:

1. Just to be safe, uninstall any current PHP installs. And if this quick tip doesn’t work the first time, you can repeat and start with a fresh Apache install as well.

2. Run the PHP installer. Pass through all the Vista and installer prompts. Allow all requests and accept all defaults (you can change the install directory if you would like, but since this is a development system we’re not concerned about security). If you got the “can’t configure httpd.conf” message just ignore it for now.

3. Here you can do one of two things: 3a) Check your PHP directory for a file called “php5apache2_2.dll”. If it’s not there, just rerun the PHP installer again. 3b) Take my word for it that it is not there and just run the PHP installer again.

That’s it. On the second go round your PHP installation will get the rest of the required files. However, if you received the httpd error message (or even if you didn’t) you probably still need to fix your Apache configuration by adding a few lines to your httpd.conf file before the whole system will work. You can easily get that information here (the comment by henke on 2/22/08 is a good place to start).

Good luck with your new development platform!

Installing PHP 5 and Apache 2.2 on Vista
0 votes, 0.00 avg. rating (0% score)

One Response to Installing PHP 5 and Apache 2.2 on Vista

  1. Alex.w474 says:

    Consider witsuite to install and configure Apache, PHP, MySQL on Windows. It is simple and efficient (installation demo: witsuite.com/products/installer/). If you prefer to install packages manually, you can use the instruction at witsuite.com/support/knowledge-base/manual-installation/

Leave a Reply