Work needs, the main station is the use of PHP development, the internal system using. NET development, the most miserable is the system when the connection, not every time to ask the classmate of PHP help, just post a JSON data, or to set up an environment, debugging it;
There are many PHP integrated development environments, such as XAMPP, Appserv ... Just one click to install the PHP environment to build. 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.
Three-piece set:
Apache
Php
Mysql
Note the PHP to download: Thread safe version of otherwise not:Php5apache2_2.dll
Installing Apache
All the way next down
Installing PHP decompression can either
Install MySQL
All the way next down
Integrated 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_module modules/mod_vhost_alias.so
Add on the next line (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"--php decompression Path
AddType application/x-httpd-php. php. html. htm
2. Found in the configuration file
DirectoryIndex index.html
Switch
DirectoryIndex index.php index.html
3. Modify the Apache Site Directory, found in the configuration file (Apache installed directory, different values displayed)
DocumentRoot "d:/develop/apache2.2/htdocs"
Switch
DocumentRoot "d:/workspace/php"
Find it again.
<directory "d:/develop/apache2.2/htdocs" >
Switch
<directory "d:/workspace/php" >
PHP: Renamed 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:/develop/php/ext"--php decompression Path
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
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 ();? >
Execution Result:
Build PHP development environment under Windows