Windows7 operating system, build PHP's development environment on Windows platform to download Wamp (Windows, Apache, MySQL, PHP initials) integrated installation package.
There are many such integrated development environments as PHP, such as XAMPP, Appserv ... As long as the one-click installation of the PHP environment to build a good. But this kind of installation method is not flexible, the software's free combination is inconvenient, at the same time also is not advantageous to the study. So I still like to build the PHP development environment manually, which module you need to install the line, or the software needs to upgrade, directly upgrade the software on the line, does not affect other software, very convenient.
First, preparation-download the required software
Apache httpd-2.2.22-win32-x86-openssl-0.9.8t.msiphp Php-5.3.10-win32-vc9-x86.zipmysql Mysql-5.5.20-win32.msi
Second, the installation of software
Install Apache: Double-click the installation, and install other Windows software is no different, when filling the server infomation, there is no special rules, as long as the information entered conforms to the format.
After the installation is complete, the http://localhost is entered in the browser and if the It works! is displayed, the Apache installation is successful.
Install PHP: Extract the Php-5.3.10-win32-vc9-x86.zip to a directory.
Install MySQL: Double click Install, if you need to change the installation directory, then select Custom in Choose Setup Type
After installation, start to configure MySQL, all the default options can be, but it is best to change the MySQL default encoding to UTF8, in the Modify security settings option to set the password, enter two times password can be completed, the last point execute complete configuration.
Iii. Integration of Apache+php+mysql
Apache: First modify Apache configuration file, let Apache support parsing php file. The Apache configuration file is httpd.conf in the Conf directory of the Apache installation directory.
1. Allow Apache to parse the PHP file and find it in the config file
Copy Code code as follows:
#LoadModule Vhost_alias_module modules/mod_vhost_alias.so
Add on the next line (the green position is based on the PHP directory)
Copy Code code as follows:
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
Copy Code code as follows:
DirectoryIndex index.html
To
Copy Code code as follows:
DirectoryIndex index.php index.html
3. Modify the Apache Site Directory, found in the configuration file (Apache installed directory is different, the value displayed is not the same)
Copy Code code as follows:
DocumentRoot "D:/develop/apache2.2/htdocs"
To
Copy Code code as follows:
DocumentRoot "d:/workspace/php"
and find
Copy Code code as follows:
<directory "D:/develop/apache2.2/htdocs" >
To
Copy Code code as follows:
<directory "d:/workspace/php" >
PHP: Rename php.ini-development as PHP.ini, PHP as the configuration file. Modify PHP.ini
1. Set up a specific directory of the PHP expansion pack to find
Copy Code code as follows:
; On Windows:
; Extension_dir = "ext"
Change to (value is the directory of the Ext folder)
Copy Code code as follows:
; On Windows:
Extension_dir = "D:/develop/php/ext"
2. Open the corresponding library function, find the library that need to open the row
Copy Code code as follows:
; 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
Copy Code code as follows:
Extension=php_curl.dll
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll
Extension=php_xmlrpc.dll
3. Set time zone, find
;d Ate.timezone =
To
Date.timezone = Asia/shanghai
The configuration is complete, and the configuration is checked for success. Restart Apache, new file index.php in the Site directory, enter:
Copy Code code as follows:
When you open the browser input http://localhost and display the following, the installation succeeds and MySQL is successfully associated.