Web Tutorials     [RO]  [EN]  
| HOME | Tutorials | News | SERVICES | Directory | Tools | FORUM | About | SITE MAP | CONTACT | SEARCH |
.....................................................
.....................................................
User happy birthdayToday we celebrate one day of birth.
(dannyb0y)
.....................................................
Login
Register
I forgot my password
.....................................................
Put your ad here
.....................................................
Online
In total there is
9 visitors online,
of which:
9 are bots
.....................................................
Put your ad here
.....................................................
.....................................................
.....................................................
.....................................................
.
Home - Install Apache, MySQL and PHP on Windows

<< What you should know before you create a website?   -   Install Apache, MySQL and PHP on Linux >>
Rate this article(Members only)
1 2 3 4 5
A - A Announced this way the site administrator for any problems observed on this page.  Print this page as PDF  Email  

Install Apache, MySQL and PHP on Windows


Publishing date: 02-11-2010 - Copyright © Liviu H.

This tutorial aims to guide them, those willing to have a web server on Windows, the installation in three steps free and open source packages, Apache, MySQL and PHP.
In this case we use:
OS: Windows XP Professional (SP2)
Web server: Apache 2.2.2
Database server: MySQL 5.0.22
Interpreter: PHP 5.1.4

Install Apache 2.2.2

First we get the server binaries: apache_2.2.2-win32-x86-no_ssl.msi (about 4.2 MB)
After I downloaded the kit, start the installation by double-click on the executable (if the system was already an older version of the server, uninstall it first).
Next follows then read (and I agree with) the terms and conditions then Next again.
And instructions for use and read and Next
I got the information about the server, which complete the following:
Network Domain (e.g. somenet.com)
localhost

Server Name (e.g. www.somenet.com)
localhost

Administrator's Email Address (eg webmaster@somenet.com)
you@yourdomain.com

and below in the same window mark
For All Users, on Port 80, as a Service - Recommended

Thus, the Apache server is installed as a service will start automatically with Windows and will be available to all users of the system.
Next we ask the type of installation, mark Typical and click Next (Love Windows:)). Further, we are informed that Apache is installed in C: \ Program Files \ Apache Software Foundation \ Apache 2.2 \. Everything is ok here, we give Next and Install
Ok, the installer has done its job, and I finished press Finish installing Apache in Windows (I will return later in this tutorial, on its configuration). If everything went right, you will notice that there is a ninth icon in the System Tray (lower right, where the clock is).
That said, I'm done, currently, with Apache.

Install MySQL 5.0.22

First we get server binaries Windows (x86) 5.0.22 (approximately 36.7 MB)
Open archive (default, Windows knows to open the archives. Zip) and, as usual, double-click the executable inside (setup.exe) (If the system already installed an older version of MySQL, uninstall it. To note is that after removal, database files created with older version is kept (C: \ Program Files \ MySQL \ MySQL Server 5.0 \ data) and could reuse in the new version.).
Press Next and then choose the Typical installation type and Next again.
Further, the installation summary is presented to us. Click Install
The next screen guides us to create a free account MySQL.com but we choose Skip Sign-up since the creation of this account is not subject to this tutorial. Click Next
Going forward, we are presented with a window in which to present a check
Configure the MySQL Server now
And mark press Finish to continue with the MySQL server configuration.
This opens the Server Configuration utility, then click Next, the following window mark Standard Configuration and of course, Next.
Next, We mark Install Windows Service for the server to install the service and start each time Windows starts. Click Next
We have two fields, both enter the same password, the user root. We then use a password to connect to our MySQL server. Click Next
The next screen presents the steps to be executed for server configuration. We click Execute and then Finish
Both the MySQL server installation.

Installing PHP 5.1.4

Get yourself Parser: PHP 5.1.4 zip package (about 8.9 MB) and a collection of extensions for it, Collection of PECL modules for PHP 5.1.4 (about 2.2 MB)
Extract archive contents Win32.zip php-5.1.4 directory c: \ php \ and archive content PECL-5.1.4-Win32.zip in the c: \ php \ ext \, newly created earlier
The next step is copying the files c: \ php \ php5apache2.dll, c: \ php \ dev \ php5ts.lib and c: \ php \ php5ts.dll directories C: \ Windows, C: \ Windows \ System and c: \ windows \ system32. And recommend copying the files from c: \ php \ ext directories mentioned above.
Next, create the boot file of PHP. Thus, copy-recommmended php.ini file in the c: \ windows \ php.ini and will in the future to edit this file to enable / disable / change the various options of PHP.
That said, I finished the installation of PHP. Now you must change your Apache configuration, so that it knows how to serve your PHP scripts. Open the file C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ conf \ httpd.conf with a text editor (Notepad, for example) and is amended ("..." lines that you can ignore):
ServerRoot "C: / Program Files / Apache Software Foundation/Apache2.2"
...
LoadModule php5_module "c: / php/php5apache2.dll"
...
DocumentRoot "C: / path / to / files / sites / your"
...
<Directory "C: / path / to / files / sites / your">
...
<IfModule Dir_module>
DirectoryIndex index.php index.html
</ IfModule>
...
<IfModule Mime_module>
....
AddType application / x-httpd-php. Php
...
</ IfModule>

That said, reboot the system and done, you have a web server on Windows, in your computer.
To check if everything is okay, create a test.php file in the C: / path / to / files / sites / your

<? Php
phpinfo ();
?>

and access to the browser http://127.0.0.1/test.php or http://localhost/test.php
That is all.

NOTE: if you start Apache you get an error message like: Could not load c: / php/php5apache2.dll then follow these steps:

  1. php5apache2.zip archive download and extract the file inside the directory where you installed PHP, overwriting your existing one
  2. httpd.zip archive download and extract the file inside the directory where you installed Apache, specifically in the C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ bin, overwriting your existing one
  3. Install Visual C + + 2005 Redistributable Package (if you have already installed the application framework. NET 2, skip this step)

Steps it only works for PHP 5.1.x and Apache 2.2!

Publishing date: 02-11-2010 - Copyright © Liviu H.   
Click here if you want to see other articles by the same author

There are 8 similar articles, click here for list.

There are no comments on this article. Be the first to say your opinion.

Add a comment on this article (members only - login on the site):
Put your ad here