Apache + Php + Mysql on Windows XP
Here's a quick guide of installing apache web server, php and mysql on windows xp and making them work together. I've written this because I have recently become frustrated when installing a new machine and couldn't get this to work from the first try.
The versions I have used are : apache 2.2.9, php 5.2.6, mysql 5.0.51. Here it is, without further comments, the mini tutorial. Be careful about the style of slashes used below and the existence or lack of the trailing slashes.
Download and install apache. This is when select your document root directory.
Download and install mysql.
Download and install php.
We have to let apache know how to interpret
Copy files
Time to configure php. Go to your php install directory and copy
Edit
That's about it. Enjoy!
The versions I have used are : apache 2.2.9, php 5.2.6, mysql 5.0.51. Here it is, without further comments, the mini tutorial. Be careful about the style of slashes used below and the existence or lack of the trailing slashes.
Download and install apache. This is when select your document root directory.
Download and install mysql.
Download and install php.
We have to let apache know how to interpret
php files. Add the following line at the end of httpd.conf from apache's conf/ directory :
Include conf/php.confCreate
php.conf in apache's conf/ directory and add the following. Also make sure you edit the php5_module so that it points to the directory where you installed php.LoadModule php5_module "c:/Program Files/Php/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-phps .phps
# configure the path to php.ini
PHPIniDir "C:/Program Files/Php"
PHPIniDir should point to the directory where you installed php.Copy files
libmysql.dll and libmcrypt.dll from the php install directory to C:/Windows/System32/ or wherever you keep your windows installed. Alternatively you can add the php install directory to the search path by editing the environment vars.Time to configure php. Go to your php install directory and copy
php.ini-recommended to php.ini Edit
php.ini and make sure you have the following set accordingly :
; replace C:/Www with the path of your document rootUncomment the extensions you're likely to use :
doc_root = "C:/Www"
short_open_tag = On
display_startup_errors = On
log_errors = On
error_log = "errors.txt"
extension=php_mbstring.dllSave
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_gd2.dll
php.ini and restart apache.That's about it. Enjoy!