Installation

This page describes the method for installing PHP and mysql running on an Apache web server with Windows Vista operating system. To install on Windows XP follow instructions but do not worry about disabling vista's permissions

Download Apache web server

  • Last download was: Win32 Binary without crypto (no mod_ssl) (MSI Installer): apache_2.2.9-win32-x86-no_ssl-r2.msi, noting MD5 signature

Download Command Line Message Digest Utility

  • Last download was: md5.zip

Download PHP5

  • Last download was PHP 5.2.6 installer, noting MD5 signature

Download PHP zip package

  • Last download was PHP 5.2.6 zip package, noting MD5 signature

Download mysql

  • Last download was mysql-essential-5.1.30-win32.msi, noting MD5 signature

Run Command Line Message Digest Utility

  • Compare MD5 signature of Apache web server, PHP5, PHP5 zip package and mySQL downloaded files making sure they are the same as stated on the website

Install Apache web server

  1. Disable Windows Firewall (via Control Panel)
  2. Disable User Account Control (via running msconfig via search, Tools - Disable UAC - Launch)
  3. Run as Administator in Command Prompt (R> Run as Administrator)

Install PHP

  1. Disable Windows Firewall (via Control Panel)
  2. Disable antivirus software
  3. Disable User Account Control (via running msconfig via search, Tools - Disable UAC - Launch)
  4. Run as Administator in Command Prompt (R> Run as Administrator)
  5. Click on MYSQL in extensions "Entire feature will be installed on local hard drive"
  6. Install in C:PHP file

Configure PHP file

  • Copy PHP.ini file in to C:windows using Notepad run as administrator (see Simon Whatley's instructions)
  • Add Apache htdosc folder path to doc_root : eg. "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
  • Add extension=php_mysqli.dll below extension=php_mysql.dll

Configure Apache httpd.conf file (C:\Program Files\Apache Software Foundation\Apache2.2\conf folder)

  • Add the following at the end of the file

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
LoadModule php5_module "C:/PHP/php5apache2_2.dll"
ScriptAlias /php/ "C:/PHP/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
AcceptPathInfo on
PHPIniDir "C:/Windows"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

  • Add index.php to DirectoryIndex eg.

<ifmodule dir_module>
DirectoryIndex index.html index.php
</ifmodule>

Add mysql libraries
Extract php5ts.dll, php_mysql.dll, php_mysqli.dll and libmysql.dll from php5 zip package and put into C:/PHP directory

Test PHP works

  • Make test.php page and place in "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"

<?php phpinfo(); ?>

Don't forget

  • Turn on Windows Firewall
  • Turn on antivirus
  • Enable UAC

Restart Apache web server

Further instructions on installing apache, php and mysql

Page tags: apache php server web
page_revision: 12, last_edited: 1228065682|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License