Core PHP
Apache 2, PHP 4 & PHP 5 on Windows XP
Core PHP
Blog: CorePHP Blog     Current Projects: PHP on XP Guide  —  NFO Viewer  —  Easy Reflections  —  HotWire  —  FileGlider

This is a comprehensive guide to installing and running Apache 2.2.4 with PHP 4.4.7 and PHP 5.2.3 on Windows XP. It covers all of the steps in detail with lots of screen grabs so you can follow the process visually.

The Guide

I know that the number of sections looks daunting, but that is because I have split the guide up into small manageable chunks. It shouldn't take you longer than a couple of minutes to complete each section.

  1. Downloads
  2. Configure Windows XP for PHP
  3. PHP 4 Settings
  4. PHP 5 Settings
  5. Create a local web site
  6. Setting the Environment Variable
  7. Install Apache
  8. Install the Apache2 Handler
  9. httpd.conf
  10. Creating a Virtual Host
  11. system32/drivers/etc/hosts
  12. Bring Apache to life
  13. Switching to PHP 5

Useful Extras

  1. Adding another web site (detailed version)
  2. Adding another web site (short version)
  3. Build a PHP 4/5 switcher
  4. Run PHP 5 as a module and PHP 4 as CGI together

Troubleshooting

  1. Apache won't start
  2. Your guide doesn't work
  3. They've just released a new version of PHP! Now what?
  4. Can't you just do it for me?

Don't be disheartened by the length of the guide! There is no reason why you can't complete the entire process in under 30 mins, and you'll be rewarded with a versatile and feature-packed local development environment as your reward.

Who is this guide aimed at?

Everyone who posts in php-general / forums asking how to get PHP and Apache running on Windows so they can develop and test locally. Often they'll hit simple but annoying problems that can be easily fixed. I also wrote this as an alternative to using a 'WAMP' installer. Teaching yourself how to install and configure PHP/Apache is a very useful set of skills to have, and well worth adding to your knowledge set.

User Feedback

Since releasing this guide I've received some great emails from people who've had success with it. Here are some of my favourite quotes:

"Thank you for your VERY helpful instructions! This point on I can now learn PHP a lot better on my own computer. Cheers!" (Patrick) - "I very much appreciate your guide - you made it really easy" (Terry) - "Richard, this is truly the best guide to setting up php and apache i've seen online. Thank you so much." (Edward) - "Thanks for the great and detailed guide" (Thijs). "Thank you very much for the php guide you spent a lot of hard work to make, the guide covered everything, screenshots, alternatives as well as any possible errors and was precise and right to the point, and because of it i finally have php installed on my computer and i can learn it more conviniently." (Gaurav)

"Very nice job on your php setup guide. I was surprised you didn't have a paypal "donate" button on the site since you provided such an detailed guide for free." and "just used your core php guide a second time and i didn't even have to think about what i was doing. it is incredible." (Will C)

"Just wanted to thank you for your perfectly clear, understandable and simple guide for installing Apache with PHP on Windows XP. I am a novice developer and you have made a potentially intimidating and frustrating experience much less so." (Greg W)

"Just wanted to say a quick thanks for the Apache/PHP setup guide. I'm a front-end bloke usually but your instructions were so clear I got through the setup in no time and now have 4 personal sites running locally and waiting for me to tinker with them!" (Iain D)

Thanks guys :) All the feedback I have received so far has been incorporated into the guide. Feel free to use the forum to send your comments / suggestions. As per your requests I have added a "PayPal Donate" button below. If you use it, thank you :)

WAMP Guide Forum

Need help on a more 'interactive' level? Then why not use the WAMP Guide Forum. Post any questions or problems you may have. You don't even need to register to join. We'll help you as much as we can.

Cheers

I truly hope you find this guide useful. If you find any mistakes, or have trouble with it then email me. You are also welcome to post comments about this guide on its related blog entry.

Last updated: 21st February 2008


Need help? Post in the WAMP Guide Forum!

© Copyright 2007 - 2008 Richard Davey