There are many PHP integrated development environments, 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.msi
PHP Php-5.3.10-win32-vc9-x86.zip
MySQL 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
#LoadModule Vhost_alias_module modules/mod_vhost_alias.so
Add on the next line (the green position is based on the PHP directory)
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
To
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)
DocumentRoot "d:/develop/apache2.2/htdocs"
To
DocumentRoot "d:/workspace/php"
and find
<directory "d:/develop/apache2.2/htdocs" >
To
<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
; On Windows:
; Extension_dir = "ext"
Change to (value is the directory of the Ext folder)
; On Windows:
Extension_dir = "d:/develop/php/ext"
2. Open the corresponding library function, find the library that need to open the row
; 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 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:
<?php
Phpinfo ();
?>
When you open the browser input http://localhost and display the following, the installation succeeds and MySQL is successfully associated.