Installing PHP on Windows
As you are reading this article, chances are good that you are also using a flavor of the Windows Operating System to access the website. Since it is the most widely used operating system, and I bet in a way you have easy access to it, I’ll focus the discussion on Installing and Running PHP under Windows.
Without further ado, listed below are the things that you need to follow on.
- Any of the following: Windows NT Server, Windows 2000, Windows XP. I am using Windows XP Professional.
- XAMPP for Windows. It is a software bundle from ApacheFriends that allows for painless installation of Apache, PHP and MySQL in your Windows Plaftorm. Actually it also contains a host of other smaller applications, but they are not necessary in our discussion.
That’s it all you need to get ready. After you have dowloaded XAMPP for Windows, it is important that you READ the following paragraph before starting on the installation process.
Make sure that your Windows box is not listening to port 80. Go and check if there is any active Web Server like IIS, Apache or Tomcat that is also using the default HTTP Port of your machine. If there is, you can either turn it off or switch it to a different port number above 1024. Please consult your Web Server Administrator’s Manual on how to do this.
For reasons that will become clear later, it is advisable that you install XAMPP on a drive other than the System Drive or Drive C. It is always a good practice to partition your drive into at least two parts. One partition (Drive C) must be allocated for all system installations, the other partition (probably Drive D) for data and all other stuff you save on your computer. But if you have not partitioned your hard drive, you may also safely proceed.
When I installed XAMPP in my workstation, it set it to D:\apachefriends\ when asked for the directory to install. After successfully installing, my directory looks like this:
D:\apachefriends\xampp\ -> It looks like XAMPP puts all the files here. You will see the directories for apache, php, mysql, phpMyAdmin, etc.
You should take note of the following directories as you will be working on them in the future lessons.
- D:\apachefriends\xampp\htdoc\ –> This directory serves as the WebRoot directory for all your PHP Scripts. All future PHP Scripts that you create will be saved here.
- D:\apachefriends\xampp\mysql\data\ –> This directory holds all the databases in your MySQL Server. When you create an MySQL Database, a directory will be created here.
So ready? Read on the Installation Manual and you will find it really easy to follow. Everything is already there. If in case you run into problems, feel free to contact me or drop your comments here on this blog.
Happy PHP Coding!
This series of articles is intended as a
Self-Paced Introductory tutorial on PHP.
[…] Intalling PHP Under Windows […]