[PHP] PHP development environment setup ?? Windows (apache2.2.22 + php5.3.29 + mysql5.7)

Source: Internet
Author: User
Tags php development environment
[PHP] PHP development environment setup ?? Windows (apache2.2.22 + php5.3.29 + mysql5.7) has been learning php and has made a little bit of php. in the past, xmpp or wamp was used to make it blind for many beginners, I don't know what it is. Now we will build a development environment and describe each of the purposes.

1, download apache http server official website: http://httpd.apache.org/Download: httpd-2.2.22-win32-x86-openssl-0.9.8t.msi PHP official website: http://php.net/Download: http://windows.php.net/download this download page, php has a default version for non thread safe Download: php-5.3.29-Win32-VC9-x86.zip

There are too many mysql versions. In fact, any version can be used. I have detailed installation instructions on mysql in my blog.


2. install apache httpd server, which is a web application server provided by apache. It provides http static services and supports php components required by php. This is a silly installation:








Install apache. Open your browser and enter http: // localhost: 80 in the address bar to view It works! It means the operation is successful.

Then we can see the icon in the lower right corner: Green drop


3. install php: decompress the downloaded zip package to any path. the decompressed path is: D: \ PHP-5.3.29-install.


4. integrate apache + php + mysql

Apache is an http web server. it needs to add a component to support php

A) first modify the Apache configuration file so that Apache can parse the php file. The Apache configuration file is httpd. conf in the conf Directory of the Apache installation directory. The path here is: D: \ Program Files \ Apache Software Foundation \ Apache2.2 \ conf open the conf configuration file and locate row 128. In fact, it doesn't matter before and after this:

LoadModule php5_module "D:/PHP-5.3.29-install/php5apache2_2.dll"PHPIniDir "D:/PHP-5.3.29-install"AddType application/x-httpd-php .php .html .htm
Add this file, and then open the php decompression Directory, that is, the installation directory to check whether the php5apache2_2.dll file exists.



From the above we can see that php5.3.29 also supports Apache2.4... Have you seen it.


B) continue to modify the configuration file and find


DirectoryIndex index.html

To:


DirectoryIndex index. php index.html

This is because the first page on the website is index.php?index.html. In fact, this can be set or not.


C) modify the apache service site Directory DocumentRoot and Directory nodes.

DocumentRoot "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs"


Change to a directory on the disk. this directory is the directory used by the apache server to find the php file.


After apache is modified, modify php:

Change php. ini-development to php. ini as the PHP configuration file. Modify php. ini

1. set the Directory of the PHP extension package and find

; On windows:
; Extension_dir = "ext"

Change to (the value is the Directory of the ext folder)

; On windows:
Extension_dir = "D:/PHP-5.3.29-install/ext"



2. enable the corresponding library function and find the row of the library to be enabled

; Extension = php_curl.dll

; Extension = php_gd2.dll

; Extension = php_mbstring.dll

; Extension = php_mysql.dll

; Extension = php_xmlrpc.dll

Remove the semicolon (comment) and change it

Extension = php_curl.dll

Extension = php_gd2.dll

Extension = php_mbstring.dll

Extension = php_mysql.dll

Extension = php_xmlrpc.dll

      

3. set the time zone and find

; Date. timezone =

Change

Date. timezone = Asia/Shanghai


Now the configuration is complete. create an index. php file in the Directory where the Directory is configured, and enter Then enter localhost in the browser to view the php information, indicating that the installation is successful .!

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.