For Windows 7, you can download the integrated installation package of WAMP (short for Windows, Apache, MySQL, and PHP) by setting up a PHP development environment on Windows. In Windows 7, php development environment is used to build a graphic tutorial,
For Windows 7, you can download the integrated installation package of WAMP (short for Windows, Apache, MySQL, and PHP) by setting up a PHP development environment on Windows.
There are many integrated development environments like PHP, such as XAMPP and AppServ ...... the PHP environment can be set up with one-click installation. However, this installation method is not flexible enough, and the free combination of software is not convenient, and it is not conducive to learning. Therefore, I still like to build a PHP development environment manually. you only need to install the module or upgrade the software without affecting other software, very convenient.
I. preparations-download 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
II. install software
Install Apache: Double-click to install Apache. it is no different from installing other Windows software. when you enter Server Infomation, there are no special rules as long as the entered information conforms to the format.
After the installation is complete, enter http: // localhost in the browser. if It Works is displayed !, Indicates that Apache is successfully installed.
Install PHP: extract php-5.3.10-win32-vc9-x86.zip to a directory.
Install MySQL: Double-click to install MySQL. to change the installation directory, select Custom in Choose Setup Type.
After the installation is complete, start configuring MySQL. keep all the default options, but you 'd better change the default MySQL encoding to utf8. set the password in the Modify Security Settings option and enter the password twice, click Execute to complete the configuration.
3. integrate Apache + PHP + MySQL
Apache: first, modify the Apache configuration file so that Apache can parse the php file. The Apache configuration file is httpd. conf in the conf Directory of the Apache installation directory.
1. Apache can parse the php file and find it in the configuration file.
The code is as follows:
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
Add in the next line (the green position depends on the directory where PHP is located)
The code is as follows:
LoadModule php5_module "D:/Develop/PHP/php5apache2_2.dll" PHPIniDir "D:/Develop/PHP" AddType application/x-httpd-php .php .html .htm
2. find
The code is as follows:
DirectoryIndex index.html
Change
The code is as follows:
DirectoryIndex index.php index.html
3. modify the Directory of the Apache site and find it in the configuration file (the directory for Apache installation is different and the displayed value is different)
The code is as follows:
DocumentRoot "D:/Develop/Apache2.2/htdocs"
Change
The code is as follows:
DocumentRoot "D:/Workspace/PHP"
Find
The code is as follows:
Change
The code is as follows:
PHP: rename php. ini-development to php. ini as the PHP configuration file. Modify php. ini
1. set the Directory of the PHP extension package and find
The code is as follows:
; On windows: ; extension_dir = "ext"
Change to (the value is the Directory of the ext folder)
The code is as follows:
; On windows: extension_dir = "D:/Develop/PHP/ext"
2. enable the corresponding library function and find the row of the library to be enabled
The code is as follows:
;extension=php_curl.dll ;extension=php_gd2.dll ;extension=php_mbstring.dll ;extension=php_mysql.dll ;extension=php_xmlrpc.dll
Remove the semicolon (comment) and change it
The code is as follows:
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 and find
;date.timezone =
Change
date.timezone = Asia/Shanghai
After the configuration is complete, check whether the configuration is successful. Restart Apache, create the file index. php in the site directory, and enter the following content:
The code is as follows:
Open the browser and enter localhost. if the following content is displayed, the installation is successful and MySQL is associated successfully.