Installing Apache, PHP, MySQL, phpMyAdmin in Windows XP/Vista

Making Servers

It would be great to have a server of your own. If you own a computer, you can turn it into a server by installing some software. Though how that extends the capability of your computer is a different matter altogether.

If you ever plan to go dynamic with your website, you would need a server to handle the backend. Now, Windows comes with its own server called Internet Information Services (IIS) but take my advice and get yourself Apache due to its high configurability and open support. In addition to setting up the server, I will also help you setup PHP, a dynamic server side scripting language; MySQL, a database backend for your website; PHPMyAdmin, to avoid the command line interface of MySQL and a few tweaks for a freshly installed server!

When I tried my hand at setting up all the above software for the first time, I admit I was totally flabbergasted! It would simply not run at all! So, if you find yourself in the same situation, don’t worry, you are not alone. And that’s the reason why I am writing this guide after all! There are alternatives like XAMP which allow you to setup everything together which makes it less of a hassle to setup the server, but I recommend installing each software individually to get an idea of how the server actually works. Setting up a server on Windows Vista presents some new challenge than when installing on Windows XP. The basic issue is of permissions. I recommend turning off User Account Control (UAC) temporarily for the installation of the server, though it is not necessary.

Step 1: Download the Apache2.2 Server and install it

Unless an error pops up, the installation should work without any extra steps. If the Apache monitor is not showing up in the task bar, just restart the system and it should come up. If for some reason the verification fails, ensure that the apache service is running by executing “services.msc” in the RUN window (Windows Key + R).

Please note that executing the Start, Stop and Restart batches directly doesn’t work (At least it didn’t for me!). You should right-click and select Run as Administrator from the context menu in Windows Vista.

Step 2: Download PHP5 and install it

Step 3: A necessary manual step for successful PHP Installation

Step 4: Verify PHP Installation

Step 5: Download MySQL5 and install it.

Step 6: Verify MySQL as well

Step 6: Get phpMyAdmin up and away!

Step 7: Tweak your server.

I will list here a few small changes that you can do to your server configuration file for a better server experience. It is not necessary and your server will run fine without these changes as well but sooner or later you will have to make these changes! If you are planning to run content management systems like Wordpress, Drupal, TypePad etc., you definitely need to make these alterations.

Setup a default file for directory request

Enable mod_rewrite feature of Apache (For advanced users only)

That’s all there is to convert your personal computer into a local server! Have a good time with your websites and any other thing you might want to do with your server! I hope this guide will make the task of setting up a server a friendly process!


Be up-to-date with your computer. Subscribe to our RSS feed!

If you enjoyed the post, please digg it, stumble it or delicious it.

Trackbacks & Pingbacks

[...] of all, install phpMyAdmin on your web server. Here’s a step-by-step guide to installing phpMyAdmin. While choosing the directory name of phpMyAdmin, try to keep it as random as possible and avoid [...]


Comments

Thanks for the article. I followed the instructions “a la lettre” and was faced with an unknown error that I can’t figure out: I get the “It Works” message, the Apache icon is on my taskbar and the service is running. I then place the info.php file in the htdocs folder and run it… Error file not found…

I also have an issue with the httpd.conf file.. your example “at the end of the file” is nowhere to be found.

PLease help as I can’t think of any way to fix this problem and get at least my info.php page running.

I have Vista.

Thanks

Olivier

Hi Olivier!

Did PHP install without any error? Since the required lines are not present at the end of httpd.conf file, it seems PHP is not installed correctly… Reinstall PHP.

The “file not found” error will also disappear once PHP is installed correctly.

Best Luck!

Leave a comment

(required)

(required)


Creative Commons License © XSRealities.com | Powered by WordPress | ElegantBlue is a custom theme by Nathan Rice. This work is licensed under a Creative Commons Attribution-Share Alike 2.5 India License.