Windows Apache PHP5 Installation Detail Tutorial

Source: Internet
Author: User
Tags character set install php mysql tutorial openssl php file win32 win32 installer zip
Download Apache want to remember the next OpenSSL
Httpd-2.2.19-win32-x86-openssl-0.9.8r.msi
Download PHP Remember the thread is safe, so that the HTTP service can be easily built
PHP Tutorials -5.2.17-win32-vc6-x86.msi
The following is reproduced.
The installation method for this article is available for Apache+php+mysql installations under Windows XP and also for installation and configuration under Windows 2003 systems.
1. Installation Environment
The operating system is the Chinese version of Windows XP, Apache, PHP, MySQL, the latest version is up to 2007.09.07, respectively, downloaded on its website:
* Apache 2.2.6:http://apache.mirror.111cn.net/httpd/binaries/win32/
* PHP 5.2.4 (Windows Binaries PHP 5.2.4 Zip package): http://www.php.net/downloads.php
* MySQL 5.0.45 windonws:http://dev.mysql tutorial. com/downloads/
2. Installed directory structure planning
In order to facilitate maintenance, the Server software can be installed in the system disk (C disk) and its own files to the other disk, so for future maintenance is very important.
3. Install Apache 2.2.6 under Windows XP
Installation under Windows XP
1. Run Apache 2.2.6 installation program, follow the prompts all the way Next. In the server information network domain, the server name field just fill in a domain name, such as Php.com, and then follow the prompts all the way through Next.
2. At the end of the installation, a DOS window pops up and disappears, which is the system Apache is automatically started.
4. Install PHP 5.2.4 under Windows XP
1. Download the PHP 5 zip package directly, I will directly extract the PHP 5.2.4 zip file to the d:php directory below. Installing PHP does not recommend using the Win32 Installer (mainly for later installation expansion trouble).
2. In the Explorer into the installation directory of PHP, the php.ini-dist or php.ini-recommended copy, named PHP.ini. Then open the php.ini.
3. Find:
; Extension=php_mysql.dll
To be in front of; The number is removed and changed into:
Extension=php_mysql.dll
4. Find:
Extension_dir = "./"
Change it to the absolute path of the EXT subdirectory under your PHP installation directory. For example, my:
Extension_dir = "d:/php/ext/"
This step is very important. Otherwise, PHP will not be able to find the Php_mysql.dll module, can not load.
5. In the "Control Panel"-> "System"-> "advanced"-> "environment variable", find path in "System variables", edit the variable value of path, add your PHP directory d:php, must be preceded by a semicolon (;) separate it from the previous value.
5. Configure Apache and PHP
Open the httpd.conf file in the Conf subdirectory under the Apache installation directory.
1. Find:
DocumentRoot "xxxxxxx"
Change to a directory of your local Web site content. For example, my:
DocumentRoot "E:/web"
After the change, a little pull down, find "# This should is changed to whatever your set DocumentRoot to." And then put this place down here.
<directory "E:/web" >
2. Find LoadModule, according to your PHP installation directory, in the space below add these two lines:
LoadModule php5_module "D:/php/php5apache2_2.dll"
Phpinidir "d:/php" This do not, lest the Apache server could not start
3. Find:
DirectoryIndex index.html
Modified to:
DirectoryIndex index.php index.html
4. Find:
AddType application/x-gzip. GZ tgz
Add these two lines:
AddType application/x-httpd-php. php
AddType application/x-httpd-php. html
5. Save httpd.conf
6. In your site directory (such as mine is e:/web/), manually create a index.php file, content:
<?php
Phpinfo ();
?>
7. Start the Apache service in a DOS window (assuming Apache is installed in the C:Program Filesapache Software FoundationApache2.2)
#如果之前启动了, stop it first
C:Program Filesapache Software foundationapache2.2bin> httpd-k Stop
Or: net stop apache2.2
#启动 APAHCE Service
C:Program Filesapache Software foundationapache2.2bin> httpd-k start
Or is: net start apache2.2
8. Open http://localhost/index.php, you can see the test output results.
6. Install MySQL 5.0.45 under Windows XP
MySQL is simple to install, it provides a Win32 installation package. After downloading according to the prompts to install, you can also select the type of installation Custom, specify the installation directory, where the default installed in the C disk.
After the installation is completed, you will ask if you want to register on the website, skip it. You will then ask if you Configure the MySQL Server now, select and continue, and then follow the prompts to set the character set and the root administrator's password.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.