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.
Update: The guide has been updated for PHP 5.2.3. I have also created a new forum here. Please use it if you run into trouble following this guide, I'll be only too happy to help. You don't even need to register to post.
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.
- Downloads
- Configure Windows XP for PHP
- PHP 4 Settings
- PHP 5 Settings
- Create a local web site
- Setting the Environment Variable
- Install Apache
- Install the Apache2 Handler
- httpd.conf
- Creating a Virtual Host
- system32/drivers/etc/hosts
- Bring Apache to life
- Switching to PHP 5
Useful Extras
- Adding another web site (detailed version)
- Adding another web site (short version)
- Build a PHP 4/5 switcher
- Run PHP 5 as a module and PHP 4 as CGI together
Troubleshooting
- Apache won't start
- Your guide doesn't work
- They've just released a new version of PHP! Now what?
- 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)
Thanks guys :) BTW all the feedback I have received so far has been incorporated into the guide. Feel free to use the new forum (see below) to send your comments / suggestions.
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.
1 comment:
Good one.. Must be pretty usefull for someone wanting to install apache and php
Developers in India
Post a Comment