Build PHP Development environment under Windows
There are many PHP integrated development environments, such as XAMPP,appserv ... Just one click to install the PHP environment is built. But this kind of installation method is not flexible, the free combination of software is inconvenient, but also not conducive to learning. So I still like to build PHP development environment manually, which module needs to be installed on the line, or the software needs to upgrade, directly upgrade the software on the line, does not affect the other software, very convenient.
First, preparation - Download the required software
1.PHP:Http://pan.baidu.com/s/1hqzOwok
2.MySQL:http://pan.baidu.com/s/1eQ081R8
3.Apache:http://pan.baidu.com/s/1i3uwJqt
Second, install the software
installation Apache: Double-click Installation, no different from installing other Windows software, when filling the Server infomation , there is no special rules, as long as the information entered in accordance with the format.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/0C/wKiom1R2l3CwxE3YAAHloAHYJvU307.jpg "style=" float: none; "title=" 1.png "alt=" Wkiom1r2l3cwxe3yaahloahyjvu307.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/0B/wKioL1R2l_PgnIWdAAHtvZGI9pM280.jpg "style=" float: none; "title=" 2.png "alt=" Wkiol1r2l_pgniwdaahtvzgi9pm280.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/0C/wKiom1R2l3CCSfPkAAGlQ6OHgQY908.jpg "style=" float: none; "title=" 3.png "alt=" Wkiom1r2l3ccsfpkaaglq6ohgqy908.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/0B/wKioL1R2l_OyfkQYAAE2IHAQVVM359.jpg "style=" float: none; "title=" 4.png "alt=" Wkiol1r2l_oyfkqyaae2ihaqvvm359.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/0C/wKiom1R2l3GRhCWaAAGdCcnhotU558.jpg "style=" float: none; "title=" 5.png "alt=" Wkiom1r2l3grhcwaaagdccnhotu558.jpg "/>
after the installation is complete, enter http://localhost in the browser , if It is displayed works! , indicating Apache installed successfully.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/0B/wKioL1R2mAqDT8jUAACefI7Fq1I287.jpg "title=" 6.png " alt= "Wkiol1r2maqdt8juaacefi7fq1i287.jpg"/>
installation PHP: unzip the Php-5.3.10-win32-vc9-x86.zip to a directory.
installation MySQL: Double-click Install, if you need to change the installation directory, select Typical default installation in Choose setup Type
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/0C/wKiom1R2l5jCWiWTAAGnmyJvbNc981.jpg "style=" float: none; "title=" 7.png "alt=" Wkiom1r2l5jcwiwtaagnmyjvbnc981.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/0B/wKioL1R2mBuQbKXLAAGonLXTJu8298.jpg "style=" float: none; "title=" 8.png "alt=" Wkiol1r2mbuqbkxlaagonlxtju8298.jpg "/>
start configuration after installation is complete MySQL, all keep the default options, but it is best to change the default MySQL code to UTF8, the Modify Security Settings option to set the password, enter two password to complete, Last click Execute to complete the configuration.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/0C/wKiom1R2l6jw7mYgAAIyNDtJVgU654.jpg "style=" float: none; "title=" 9.png "alt=" Wkiom1r2l6jw7mygaaiyndtjvgu654.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/0B/wKioL1R2mCvSIEeIAAIC5Ls0-uY603.jpg "style=" float: none; "title=" 10.png "alt=" Wkiol1r2mcvsieeiaaic5ls0-uy603.jpg "/>
Third, Integration Apache+php+mysql
Apache: First Modify the Apache configuration file, let Apache support parsing PHP files. Apache configuration Files are httpd.conf in the Conf directory of the Apache installation directory .
1. allow Apache to parse the PHP file and locate it in the configuration file
#LoadModule vhost_alias_modulemodules/mod_vhost_alias.so
on the next line add (The green location is based on the directory where PHP is located .)
LoadModule php5_module "D:/develop/php/php5apache2_2.dll"
Phpinidir "d:/develop/php"
AddType application/x-httpd-php. php. html. htm
2. found in the configuration file
DirectoryIndex index.html
Switch
DirectoryIndex index.php index.html
3 , find DocumentRoot There's this line .
DocumentRoot "C:/Program Files/apache group/apache2/htdos"
This is the root directory of your site, you can modify, you can also use the default . If you change , also modify the following , Otherwise, it may appear 403 Error
4 , find This should is changed to whatever the set DocumentRoot to
There are two lines below it
<directory "C:/Program files/apache Group/apache2/htdocs" >
put the above two items C:/Program Files/apache Group/apache2/htdos change to the directory you want
PHP: renamed Php.ini-development to php.inias a php configuration file. Modify php.ini
1. set The specific directory for the PHP expansion pack to find
; On Windows:
; Extension_dir = "ext"
instead ( value is the directory of the Ext folder )
; On Windows:
Extension_dir = "D:/develop/php/ext"
2. turn on the library function to locate the row of the library you want to open
; Extension=php_curl.dll
; Extension=php_gd2.dll
; Extension=php_mbstring.dll
; Extension=php_mysql.dll
; Extension=php_xmlrpc.dll
Remove the preceding semicolon ( note ) , the change is
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 to find
;d Ate.timezone =
Switch
Date.timezone =CRT
which PRC:people ' s Republic of China ,
configuration is complete to detect the success of the configuration. Restart Apache, in the Site directory, create a new file index.php, enter the content:
<?php
Phpinfo ();
?>
Open the browser input http://localhost, display the following content, the installation was successful, and successfully associated with MySQL.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/0C/wKiom1R2l7mROWWXAAI3m8IemBo518.jpg "style=" float: none; "title=" 12.png "alt=" Wkiom1r2l7mrowwxaai3m8iembo518.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/0B/wKioL1R2mDuiZdXwAAJQd8rnl-c892.jpg "style=" float: none; "title=" 11.png "alt=" Wkiol1r2mduizdxwaajqd8rnl-c892.jpg "/>
This article is from the "7924127" blog, please be sure to keep this source http://7934127.blog.51cto.com/7924127/1583129
Build PHP development environment under Windows