Always have the idea of learning PHP, but also a little bit PHP, used to be XMPP or wamp to achieve this will make many beginners blind, do not know what. Now build the development environment and explain the use of each one.
1, download Apache HTTP Server official website: http://httpd.apache.org/Download: Httpd-2.2.22-win32-x86-openssl-0.9.8t.msi PHP Officer NET: http://php.net/Download: http://windows.php.net/download This download page, PHP has a NTS version for non thread Safe Download: Php-5.3.29-win32-vc9-x86.zip
MySQL is too much, in fact, any version of the line, my blog has a detailed installation of MySQL instructions.
2, install Apache httpd Server This is the Web application server provided by Apache it can provide HTTP static service, support PHP needs its PHP components. This is all a fool-mounted installation:
The installation of Apache is complete. Open the browser and enter http://localhost:80 on the address bar to see it works! to show success.
Then you can see the icon in the lower right corner: the Green Drop
3, install PHP: will download the zip package, unzip to any path, I unzipped the path is: D:\PHP-5.3.29-install
4, the Apache + PHP + MySQL integration run
Apache is an HTTP Web server that needs to add a component to support PHP
A) first modify the Apache configuration file so that Apache supports parsing PHP files. Apache configuration files are httpd.conf in the Conf directory of the Apache installation directory. Our path here is: D:\Program Files\apache software foundation\apache2.2\conf Open the Conf configuration file to locate 128 rows, in fact, there is no matter here and there:
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 in, and then we open the PHP extract directory that is the installation directory to see if there is php5apache2_2.dll this file.
From the above you can see that the php5.3.29 version also supports the Apache2.4 version ... Did you see it?
b) Continue to modify the configuration file to find
<ifmodule dir_module>
DirectoryIndex index.html
</IfModule>
Modified to:
<ifmodule dir_module>
DirectoryIndex index.php index.html
</IfModule>
This means that the site below the homepage is set to index.php or index.html in fact this can be set or not set.
c) Modify the two nodes of the Apache Service Site Directory documentroot and directory.
DocumentRoot "D:/program Files/apache software Foundation/apache2.2/htdocs"
<directory "D:/program files/apache software Foundation/apache2.2/htdocs" >
Modify it to a directory on your disk, which is the directory where the Apache server is looking for PHP files
Apache modified, then modified PHP:
Rename the php.ini-development to php.ini as a PHP configuration file. Modify PHP.ini
1. Set the specific directory for the PHP expansion pack to find
; On Windows:
; Extension_dir = "ext"
Change to (value is the directory of Ext folder)
; On Windows:
Extension_dir = "D:/php-5.3.29-install/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) and change to
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 = Asia/shanghai
Configured here, in the directory configuration of a new index.php file, enter <?php phpinfo ()?> and then browser input localhost will be able to see the PHP information, indicating that the installation was successful.
"PHP" PHP Development Environment Building--windows (apache2.2.22+php5.3.29+mysql5.7)