Installation Instructions
(Windows Local PC Server - Vista - XP)
Apache 1.3X/2/2.2X PHP 4.4X/5 MySQL
FIREWALLS - While installing turn off any firewalls
INSTALLING APACHE
** If you have previous installs/attempted installs please remove thoroughly and reboot PC.
Removal often leaves the folders and some files .. remove these also. Ensure that no programs are using port 80
(e.g. Skype) Ctrl Alt Delete to check if any apache processes are running (kill) .. then ..
start > All Programs > Startup
Remove any apache startup programs
** #### VISTA ONLY NOTE #### 1. Uninstall Apache Web server and remove the files from program files folder.
2. Go to start > control panel > user accounts.
3. Click on "turn user account control on or off".
4. Uncheck "user user account control (UAC) to protect your computer".
5. Click "OK".
6. Restart Windows Vista.
7. Move the apache executable to desktop and rename to apache.msi
8. Start > All Programs > Accessories
9. Right-Click "Command Prompt" and choose "Run as Administrator"
10. Change to your desktop folder (At prompt type cd desktop)
11. Type the following: "msiexec /i apache.msi"
12. Run through the Apache installer as normal.
13. Restart Vista
Add note: If you get an annoying red box on apache startup .. go start > All programs > Startup and remove the apache entry there
##### END Vista Only Note ##### Apache Versions: PHP4 use 1.3X or 2.0X
PHP 5 use what you like including 2.2X
Make sure it's the Win32 Binary (MSI Installer):
Click on the apache installer
1) Once you have the installer up and running:
Keep clicking next etc
2) A default domain will be created, I would recommend you use the default.
3) Email can be whatever you want.
4) You should select the option to use it as a service.
5) Keep going until it is installed and let it start the service.
6) Browse to http://localhost and you should get a message that it is ok.
INSTALLING PHP
1) unzip it to C:\Program Files\
2) The folder will be called something ridiculous like php-4.4.6-Win32
Rename it to just PHP (Makes things easier later.)
You should now have a folder C:\Program Files\PHP
3) Go into your PHP folder and look for a file called php.ini-recommended
Rename it to php.ini, and copy it into the C:\WINDOWS directory
4) Now open Notepad, and tell it to open that file.
Ctrl-F and type in ;cgi.force_redirect = 1 When you find it, change it to cgi.force_redirect = 0
5) Now press Ctrl-F and type extension_dir = "./" When you find it change it to
PHP 5
extension_dir = "C:\Program Files\PHP\ext"
PHP4
extension_dir = "C:\Program Files\PHP\extensions"
6) Next find ;upload_tmp_dir = change it to upload_tmp_dir = "C:\WINDOWS\Temp"
## You will probably need to change Temp folder permissions for sessions etc to work ###
7) Next find session.save_path = /tmp and change it to session.save_path = "C:\WINDOWS\Temp"
8) Scroll back to the top again, make sure you click at the top so it knows you are at the top of the file, and hit Ctrl-F
This time search for display_errors = Off change it to display_errors = On
9) search for ;extension=php_gd2.dll remove the ;
10) Search for extension=php_mysql.dll make sure there is no ; at the front
If you can't find it just add extension=php_mysql.dll to the extensions list
11) Search for extension=php_mbstring.dll make sure there is no ; at the front
### check the other ;extension listings for other services that you may require. Also things like register_globals ###
12) We are done with php.ini so save the file
13) Find 2 files in your C:\Program Files\PHP folder .. (these files get moved about so look in folders if not there)
######## php5ts.dll for PHP 5 ################
php4ts.dll
libmysql.dll
Copy both files to your C:\WINDOWS\system32 directory
Configuring PHP - Apache
1) Go into C:\Program Files\Apache Group\Apache\conf (or where ever the installer put apache: maybe named slightly differently)
Mine e.g. is C:\Program Files\Apache Software Foundation\Apache2.2\conf
2) open up httpd.conf
Search for #LoadModule mime_magic_module modules/mod_mime_magic.so and add just above it
LoadModule php4_module "C:\Program Files\PHP\sapi\php4apache2.dll" (assumes apache 2.0X with PHP4 and the file is in SAPI dir)
######### Apache version for PHP4 php4apache.dll = 1.3X, php4apache2.dll = 2.0X ######
######### Apache version for PHP5 php5apache.dll = 1.3X, php5apache2.dll = 2.0X, php5apache2_2.dll = 2.2X ######
Note: make sure the file is at this location or adjust as necessary (It may not be in the SAPI directory)
Mine is e.g. C:\Program Files\PHP\php4apache2_2.dll
3) Next search for AddType application/x-gzip .gz .tgz add below it AddType application/x-httpd-php .php
4) Next search for DirectoryIndex index.html add below it DirectoryIndex index.php
Save the file
5) Restart apache then browse to the htdocs folder (this is localhost) place in there a file called phpinfo.php
containing ..
<?php
phpinfo();
?>
browse to http://localhost/phpinfo.php If you get the PHP information then it's working.
INSTALLING MySQL
Note: Be careful if you intend to install MySQL5 and you are using old/sub standard scripts. It is strict and many queries will fail.
Click on the executable you downloaded and just let it rip :) choose all the default options (or rather they are chosen for you).
You needn't have a password you can leave it blank, username will be root automatically.
If it started up ok I would now reboot my PC.
Browse again to http://localhost/phpinfo.php and make sure there is now a box for MySQL
If there is then
WE'RE DONE!