Build apachehttpserver, php, and mysql development environments in windows

Source: Internet
Author: User
1. Required Software: 1. Search for apachehtppserver: Enter "apachehttpserver" to download it from the Baidu Software Center. Or go to the apache official website to download. 2. php: download from the php official website. Note: apachehttpserver2.2 is applicable to php5.4 and later versions. Apachehttpserver2.4 is applicable to php5.5 and later versions. Because p

1. Required Software: 1. Search for apache htpp server by entering "apache http server" on Baidu to download it from Baidu Software Center. Or go to the apache official website to download. 2. php: download from the php official website. Note: apache http server2.2 is applicable to php5.4 and earlier versions. Apache http server2.4 is applicable to php5.5 and later versions. Because p

I. Required software:

1. apache htpp server:

Baidu can search for "apache http server" and download it from the Baidu Software Center. Or go to the apache official website to download.

2. php:

Download the php official website.

Note:: Apache http server2.2 is applicable to php5.4 and earlier versions. Apache http server2.4 is applicable to php5.5 and later versions. Php5.5 and later versions only support php5apache2_4.dll and php5apache2_2.dll. php5apache2_2.dll is a dynamic link library for apache2.2.

VC6 is compiled using the legacy Visual Studio 6 compiler.

VC9 is compiled using the Visual Studio 2008 compiler.

Non-Thread Safe is Non-Thread security.

Thread Safe is Thread security.

We do not officially recommend that you use Non-Thread Safe in the production environment, so we should use PHP of Thread Safe version.

3. mysql:

Go to the mysql official website download: http://dev.mysql.com/downloads/mysql/


Ii. installation:

1. install apache:

Click Install to go to the next step.

A. enter the Server information. Set the Network Domain and Server Name to localhost and leave an email address. Select the HTTP service installation method as needed, the top is the default port 80, which may conflict with the IIS service port of Windows 7, and the bottom is port 8080.


B. Select a Typical installation (Typical.


C. Select the installation path.


D. install.


E. Waiting for Installation


F. installation is complete.


Now, apache installation is complete. Then test:

Start the service


Enter http: // localhost in the browser to display It Works!

2. php installation:

Php decompress the package.

3. Install mysql:

A. Double-click the installation file and select "next"


B. Select accept installation protocol and click "next"


C. Select custom installation (custom)


D. Set the mysql installation path:


E. Click "install"


F. Installing...


G. The installation is complete.


H. Configure mysql: Select Detailed Configuration (manual precise Configuration)


I. select the Server type, such as Developer Machine, Server Machine, and Dedicated MySQL Server Machine.


J. select the mysql Database usage, such as "Multifunctional Database (Universal multi-function type)", "Transactional Database Only (server type)", and "Non-Transactional Database Only (Non-transaction type )", select Multifunctional Database

K. next

L. on the displayed page, select the mysql access volume and the number of connections at the same time. For example, "demo-support (DSS)/OLAP (about 20)" and "Online Transaction Processing (OLTP) (about 500) "," Manual Setting (Manual Setting, set to 15) Here select Manual Setting, click "next" to continue

M. on the displayed page, set whether to enable the TCP/IP connection and set the port. If the port is not enabled, you can only access the mysql database on your machine. The default port is 3306, enable strict syntax settings. If an error occurs later, select "Add firewall exception for this port" and click "next" to continue.

N. Set the character encoding to be used by mysql. The first is the Western text encoding, the second is the multi-byte universal utf8 encoding, and the third is manual. We select UTF-8, and then click "next"

O. select whether to install mysql as a windows Service. You can also specify the Service Name (Service ID Name) and whether to add the bin directory of mysql to Windows PATH, you can directly use the file in bin without specifying the directory name, such as connection, "mysql-u username-p password;", and click "next"

P. Set the password of the root user (Super administrator) and enable the root remote access function. Do not create anonymous users and click "next"

Q. All configuration operations have been completed. Click Execute to Execute the Configuration:



3. Configure apache, php, and mysql integration:

Apache loads modules by reading the http. conf file. Next we add the php module to http. conf, and apache can load the php module to complete integration with php.


Mpm: mutil processing module multi-processing module

Apr: Portable Runtime Library

1. Modify apache. conf configuration:

Open the apache. conf file in the apache/conf directory.

A. Add the php module:

"Ctrl + F" search for "LoadModule" and add

LoadModule php5_module "E:/PHP/php-5.3.29/php5apache2_2.dll"
PHPIniDir "E:/PHP/php-5.3.29"
AddType application/x-httpd-php. php. html. htm

Change the red part to your php installation path.

B. Find

 
      DirectoryIndex index.html
 
Change
 
      DirectoryIndex index.php index.html
 

C. Modify the apache site directory.

Find

DocumentRoot "D:/Apache2.2/htdocs"
 
 

Changed:

DocumentRoot "E:/workspace"
 
In this way, the php project developed in the future will be accessed in the specified edisk workspace.

2. Modify the php. ini file:
Go to the php installation directory and change the php. ini-development file to php. ini as the php configuration file.

A. Specify the php extension library path:

Search found

; extension_dir = "ext"
Remove the semicolon and change the path to the php installation path, that is
extension_dir = "E:\PHP\php-5.3.29\ext"

Install php in front of \ ext

B. Support for mysql and phpMyAdmin:

Find

;extension=php_curl.dll;extension=php_gd2.dll;extension=php_mbstring.dll;extension=php_mysql.dll;extension=php_xmlrpc.dll
Remove the Semicolon ";", which is:

extension=php_curl.dllextension=php_gd2.dllextension=php_mbstring.dllextension=php_mysql.dllextension=php_xmlrpc.dll

C. Set the time zone:

Find

;date.timezone =
Change
date.timezone = Asia/Shanghai

3. Test

Create an index. php file in the site directory "E:/workspace. Write content:

 
Open the browser: http: // localhost/index. php. Display


Flip down:

So far, integration of apache, php, and mysql has been achieved.

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.