tecnico conferenza

« PreviousNext »

Installing Apache 2.2.2, PHP 5.1.4, MySQL 5.0.22 on Microsoft Windows XP

11 July 2006

Using Web applications and also developing them requires an installation of Apache, PHP and MySQL to be present. Let’s see how easy it is to install these on Microsoft Windows XP. I am using the current stable versions of these i.e., Apache 2.2.2, PHP 5.1.4. MySQL 5.0.22 for this purpose.

Installing Apache 2.2.2

1. Download Apache 2.2.2 (apache_2.2.2-win32-x86-no_ssl.msi) from http://httpd.apache.org/download.cgi
2 .Double click the executable to begin the installation process
3. When the Server Information dialog appears, enter the details such as your Network domain, Server Name, Administrator’s E-mail address. If your system isn’t part of any domain enter the IP Address of the Windows XP system on which you’re installing for Network domain and Server name.
4. Select the radio button “for all Users, on Port 80, as a Service – Recommended” and press Next.
5. Choose the “custom” radio button and press Next.
6. If you’d like to install in a location different from the default, choose it now and press Next.
7. Now press the Install button.
8. A dialog box will appear that Apache 2.2.2 was successfully installed.
9. Press the Finish button.

Verifying the Apache Installation

1. Open up a browser and enter the URL as http://Server_Name-or-IP_Address/ and press Enter. The Server Name or IP-Address should be same as you’ve provided during installation.
2. A page will be displayed with the following text : “It works!”
3. This indicates that the Apache 2.2.2 is up and running on your system.

Installing PHP 5.1.4

1. Download PHP 5.1.4 zip package (php-5.1.4-Win32.zip) from http://www.php.net/downloads.php
2. Extract it to C:\PHP

Configuring Apache 2.2.2 for PHP 5.1.4

1. Go to Start->All Programs->Apache HTTP Server 2.2.2->Configure Apache Server->Edit the Apache httpd.conf Configuration File
2. This will open up httpd.conf file in an editor
3. Search for “DirectoryIndex index.html” in this file.
4. Append index.php to the end of this line.
5. Append the following lines to the end of the file httpd.conf
LoadModule php5_module C:/PHP/php5apache2.dll
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php-source .phps

6. Save the file httpd.conf

Additional Configuration for Apache 2.2.2 and PHP 5.1.4

1. Download Apache2 Handler(php5apache2.dll-php5.1.x.zip ) from http://www.apachelounge.com/download/mods/php5apache2.dll-php5.1.x.zip
2. Rename the php5apache2.dll to old-php5apache2.dll in the C:\PHP directory
3. Extract the php5apache2.dll from the php5apache2.dll-php5.1.x.zip file into C:\PHP
4. Extract httpd.exe.manifest file from php5apache2.dll-php5.1.x.zip to C:\Program Files\Apache Software Foundation\Apache2.2\bin
5. Copy php5ts.dll from C:\PHP to C:\Windows\System32
6. Copy php.ini-dist from C:\PHP to C:\Windows
7. Rename php.ini-dist to php.ini in C:\Windows
8. Edit C:\Windows\php.ini and change “./” in extension_dir to “C:\PHP\ext”
9. Uncomment the line session.save_path = “N;/path” and change it to session.save_path = “C:\Windows\temp”
10. Restart Apache

Verifying the Apache 2.2.2 + PHP 5.1.4 Installation

1. Create a file named index.php in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs
2. The contents of the index.php should be as:
&lt?php

phpinfo()

?&gt

3. Save the file
4. Now open a browser and enter the URL http://server-name_or_ip-address/index.php
5. A page will be displayed listing all the PHP related information.
6 .If you see this page with PHP Version 5.1.4 at the top, then you’ve successfully installed both Apache 2.2.2 and PHP 5.1.4 on your system.

Installing MySQL 5.0.22

1. Download MySQL 5.0.22 (mysql-5.0.22-win32.zip) from http://dev.mysql.com/downloads/mysql/5.0.html. Select the link with Windows (x86) from Windows Downloads
2. After extracting it to a temporary directory, double-click the Setup.exe
3. Press Next, select custom setup and then press Next
4. Change the status of Developer Components to “This feature will be installed on local hard driver” and press Next
5. Now press the Install button.
6. From the Sign Up dialog box, select Skip sign-up and press Next
7. Leave the default option selected i.e., Configure the MySQL Server now selected and press Finish.
8 .Press Next, Select Standard Configuration and press Next
9. Leave the default options selected and press Next
10. Give the root password and press Next. This password will be used to create databases, tables etc using clients.
11. Press Execute button.
12. Press Finish when prompted.

Now, our system is ready for installing or developing any web applications.

Posted in Web | Trackback | del.icio.us | Top Of Page

    2 Responses to “Installing Apache 2.2.2, PHP 5.1.4, MySQL 5.0.22 on Microsoft Windows XP”

  1. Dakit Says:

    I tried it with apache 2.2.3 and php 5.1.5 and it doesn’t work. I’m doing something bad or you know something about it?

  2. syscon Says:

    Can you mention the exact problem you’re facing? I may be able to look into it if you could provide me specific details.

    Also, do have a look at http://www.apachefriends.org/en/xampp-windows.html , which is an easy method for getting it work.

Leave a Reply