Hire a senior Perl / Python programmer today; download my up-to-date resume (PDF)
John Bokma Windows tips and tricks
freelance Perl programmer

Installing PHP for Apache on Windows XP

Step-by-step guide | 2 comments

This article describes how to install PHP 5.1.5 on a computer running Windows XP and the Apache HTTP server. If you haven't installed Apache yet, you might want to read: Installing and configuring Apache on Windows XP.

Downloading PHP 5.1.5

Go to the PHP download page and select the PHP download you want to install. At the time of writing PHP version 5.1.5 had just been released, so I decided to download de PHP 5.1.5 Windows binaries as a zip package because the install.txt that comes with PHP states that "Use of the installer isn't the preferred method for installing PHP". Also manual installation gives you a better understanding of the PHP system.

Selecting the PHP 5.1.5 zip package for download.
Selecting the PHP 5.1.5 zip package for download.

Next, you are redirected to a page with an overview of mirrors that offer the PHP 5.1.5 zip package for download. Select a mirror nearest to you for downloading the distribution. The download should start after you activated a download link. I recommend to verify the MD5 sum of the download with the one given on the PHP download page.

Unpacking and moving PHP into the right folder

After downloading the file, log in using an account with Administrator rights, and extract the files, for example by using the context menu (click right mouse button) after selecting the zip package and selecting "Extract All..." from that menu.

Contents of the C:\PHP folder.
Contents of the C:\PHP folder.

Move the folder with the extracted files, named php-5.1.5-Win32 on my system, to the top level of the C drive (i.e. C:\) and rename the folder to PHP. Note that if you decide to move the folder to a different location that the path shouldn't have any spaces in it otherwise according to section "Manual Installation Steps" of the installation.txt file that comes with the PHP distribution: "some web servers will crash".

Please post a comment | read 2 comments, latest by shashank | RSS feed