Windows + Apache + PhP5 installation tutorial

Source: Internet
Author: User
Tags win32 installer

Introduction: This is a detailed page of Windows + Apache + PhP5 installation tutorial. It introduces PHP, related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 337297 'rolling = 'no'>

Remember to download Apache from OpenSSL

Httpd-2.2.19-win32-x86-openssl-0.9.8r.msi

The downloaded PHP should remember that the thread is secure so that the HTTP service can be set up easily.

Php-5.2.17-Win32-VC6-x86.msi

Below is the reprinted

 

ThisArticleThe installation method is applicable to Apache + PHP + MySQL installation in Windows XP, and also to installation and configuration in Windows 2003.

1. installation environment
The operating system is the Windows XP Chinese version, Apache, PHP, and MySQL. The latest version ends:
* Apache 2.2.6: http://apache.mirror.phpchina.com/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 windows: http://dev.mysql.com/downloads/

2. directory structure Planning for Installation
To facilitate maintenance, you can install the server software on the system disk (drive C) and locate your files on other disks. This is very important for future maintenance.

3. install Apache 2.2.6 on Windows XP
Installation in Windows XP
1. run Apache 2.2.6 InstallationProgram, Follow the prompts to go all the way to next. Enter a domain name in the network domain and server name fields of server information, such as php.com, and click Next as prompted.

2. At the end of installation, a DOS window will pop up and disappear. This is automatically started by Apache.

4. install PHP 5.2.4 in Windows XP
1. decompress the downloaded PHP 5 zip package. I will directly decompress the PHP 5.2.4 ZIP file to the D: \ PHP Directory. It is not recommended to use Win32 installer to install PHP (it is difficult to install extension later ).

2. Go to the PHP installation directory in the resource manager and copy PHP. ini-Dist or PHP. ini-recommended and name it PHP. ini. Then open PHP. ini.

3. Find:

; Extension = php_mysql.dll

Remove the previous; number and change it:

Extension = php_mysql.dll

4. Find:

Extension_dir = "./"

Change it to the absolute path of the ext subdirectory in your PHP installation directory. For example, my:

Extension_dir = "D:/PHP/EXT /"

This step is important. Otherwise, PHP cannot find the php_mysql.dll module and cannot load it.

5. go to "Control Panel"> "system"> "advanced"> "environment variables", find path in "system variables", and edit the variable value of path, add your PHP Directory D: \ PHP, which must be separated by a semicolon.
5. Configure Apache and PHP

Open the httpd. conf file in the conf subdirectory of the Apache installation directory.
1. Find:

DocumentRoot "xxxxxxx"

Change to the content directory of your local website. For example, my:

DocumentRoot "E:/Web"

After the change, pull down and find "# This shoshould be changed to whatever you set DocumentRoot to.", and then change the following content.

<Directory "E:/Web">

2. Find the loadmodule and add the following two lines in the blank space according to your PHP installation directory:

Loadmodule php5_module "D:/PHP/php5apache2_2.dll"
Phpinidir "D:/PHP ".

3. Find:

Directoryindex index.html

To:

Directoryindex index. php index.html

4. Find:

Addtype application/X-gzip. GZ. tgz

Add these two rows:

Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. html

5. Save httpd. conf.
6. Create an index. php file in your website directory (E:/web/For example). The content is as follows:

<? PHP
Phpinfo ();
?>

7. Start the apache service in the DOS window (assuming that Apache is installed in c: \ Program Files \ Apache Software Foundation \ apache2.2 \)

# If it has been started before, stop it first
C: \ Program Files \ Apache Software Foundation \ apache2.2 \ bin \> httpd-K stop
Or: net stop apache2.2

# Start the apahce Service
C: \ Program Files \ Apache Software Foundation \ apache2.2 \ bin \> httpd-K start
Or: Net start apache2.2

8. Open http: // localhost/index. php to view the test output.

6. Install MySQL 5.0.45 in Windows XP
MySQL installation is relatively simple. It provides a Win32 installation package. After the download, follow the prompts to install it all the way. You can also select Custom in the installation type to specify the installation directory, which is directly installed on the C drive by default.

After the installation is complete, you will be asked if you want to register on the official website. skip this step. Then, you will be asked whether to configure the MySQL server now, select and continue, and set the character set and the password of the root administrator as prompted.

OK. Now you can use Apache + MySQL + PHP to develop web programs under XP.

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/337297.html pageno: 9.

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.