How to configure PHP, APACHE and MySQL on WINDOWS XP?
STEPS TO INSTALL PHP4, APACHE AND MySQL ON WINDOWS XP
======================================================================
1) First of all, download php4 setup (zip file) php4.3.4-win32.zip from www.php.net
2) Unzip this file into D drive (say) and name the folder as php4 (or whatever you like), so that the path is
d:\php4
3) Now, rename the php.ini-dist file to php.ini
4) Copy this file into your Windows\System32 directory.
5) Return back to your php4 folder and copy another file named php4ts.dll into Windows/System32
directory.
6) Copy php.ini and php4ts.dll into d:\php4\sapi
7) Now download Apache Http Server (at the time of writing this guide, I was using version 1.3.28), from
its site.
8) It is better to download the windows installer package (.msi), because it is just as simple to install as any other
software.
9) Install Apache Http Server into your D drive and let the path be d:\apache group\apache. Here, you will
find a folder named HTDOCS. We will use this folder as our root directory ("/"). It means that all your php
and html pages will be saved here, and you can manage these pages in different folders. Such as, you can create
a folder in HTDOCS, named TEST and write the following php script and save it into this folder:
echo(phpinfo());
?>
Suppose, we named this script as testinfo.php and saved it into d:\apache group\apache\htdocs\test
10) Copy the files php.ini and php4ts.dll from d:/php4 into d:\apache group\apache\
11) Now its time to make some changes into your httpd.conf file, which is present in d:\apache group\apache\conf
12) Copy the following lines at the end of httpd.conf file:
LoadModule php4_module d:\php4\sapi\php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
Now, search for the following lines in your httpd.conf file :
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
Atfer these lines add the following line (means remove the commenting sign # and modify the path as
ServerRoot "d:/Apache Group/Apache"
13) This was all about setting up Apache with PHP4. Simple, isnt it ?
14) The last thing left is MySQL. Download the installer package from its site. (At the time of writing this guide,
I was using the version 3.23.55).
15) Install it into your D drive as D:\mysql
16) Use localhost as your server (domain) name wherever the MySQL install wizard asks you to provide a server name.
17) You`re just a single step away from success. Look into your mysql directory and there you will find a file named my-small.cnf.
Rename this file into my.cnf and copy it into D drive, so that it becomes D:\my.cnf.
18) Dont forget to copy this file into Windows\System32.
19) Be sure to keep a shortcut for Apache startup on your desktop. To start the MySQL server, just make a shortcut of
D:\mysql\bin\winmysqladmin on desktop. Double Click to start, you will find a green traffic signal on your taskbar.
Thats all about setting up and successfully installing PHP4, APACHE and MySQL on windows XP.
HAPPY PROGRAMMING!