Installing apache 2.2, php 5.2 and mysql 5 in windows vista

Here’s a quick guide for installing apache 2.2, php 5.2 and mysql 5 in windows vista.

Download needed files:
1. Apache – msi file
2. PHP – better choose the zip file than the msi installer
3. MYSQL – msi file
4. Create a folder on where you want your files to be placed. ie. C:\WEB

Before you proceed make you’re have turned off the UAC (User Account Control) setting  or else you’ll be on a big trouble.

A. Installing APACHE

Run the installer and just simply follow the instructions there and choose the option to run it as a service for your convenience. For the server name you can just put localhost. To make sure you’ve installed it properly open your browser and type http://localhost or http://your_computer_name and you will see a message saying IT WORKS!

B. Installing PHP

Unzip the files on the folder you’ve created on #4 which is C:\WEB. And that’s it.

C. Configuring APACHE and PHP settings

APACHE - Open httpd.conf on Apache Software Foundation/Apache2.2/conf/ and have the following settings below: TAKE NOTE OF THE FORWARD SLASH “/”.

1. Locate LoadModule and add these lines below:

  • LoadModule php5_module “C:/WEB/PHP/php5apache2_2.dll” - (Make sure you have the correct path and the name of the dll file or else you’ll encounter the error mentioned on the last part of this guide)
  • PHPIniDir “C:/WEB/PHP – (Location of your PHP mentioned on #4 )

2. Locate and uncomment the following:

  • ServerName localhost:80
  • LoadModule rewrite_module modules/mod_rewrite.so – optional, uncomment if you’ll be using mod_rewrite

3. Locate and change the path of the following lines to the folder you’ve created on #4.

  • DocumentRoot “C:/WEB”
  • <Directory “C:/WEB”>

4.  Locate and add the following

  • locate AddType and add  this line   AddType application/x-httpd-php .php
  • locate DirectoryIndex index.html  and index.php

5. Modify the following

  • Locate for <Directory “C:/WEB”> – the one you’ve just modified, the location of your files. Below it you will find Allowoverride None change it to Allowoverride All to be able to use htaccess file. - optional
  • Locate display_errors – Off  = You might want to turn this on, for debugging purposes. - optional

PHPOpen php.ini located in C:/WEB/PHP and have the following settings below: TAKE NOTE OF THE BACK SLASH “\”.

1. Locate and change the path to the folder you’ve created on #4.

  • doc_root = “C:\WEB”
  • extension_dir = “C:\WEB\PHP\ext”

2. Uncomment the following: Needed for mysql

  • extension=php_mysql.dll
  • extension=php_mysqli.dll

3. Optional. Locate and uncomment

  • short_open_tag = Off  – The default value is OFF change it to ON. You will need this if you use <? echo “hello”; ?> instead of <?php echo “hello”; ?>
  • E_ALL & ~E_NOTICE – Error reporting except for warnings and notices

D. Installing and configuring MYSQL

Just simply run the installer and follow the wizard configuration. Make sure apache is running.

Some errors you may encounter:

1. When starting the apache  you may encounter this error “...operation has failed “ – Just make sure you have the correct path for loadmodule mentioned on httpd.conf as well as other paths and if you still got the error open apache monitor click on connect and type your computer name and try starting apache again.

So that’s pretty much about it. Have fun!!!









This entry was posted in apache, mysql, php and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>