Installation of the Windows installation PHP environment: httpd-2.2+php-5.4+mysql-5.5
The first step is the installation of the three software, as long as you understand some of the English word, the installation is not a problem, so this process over the installation of three files, jump directly into the second step!
The second step, the configuration file, integrates Apache+php+mysql.
Configure the Apache configuration file httpd.conf to support parsing of PHP files.
Under the Apache Conf folder, locate the httpd.conf file and open it, use Ctrl+f to find #loadmodule vhost_alias_module modules/mod_vhost_ Alias.so, add the following file content (green content for the PHP file):
LoadModule php5_module "D:/php/php5apache2_2.dll"
Phpinidir "d:/php"
AddType application/x-httpd-php. php. html. htm
Find DirectoryIndex index.html in the file add index.php
Find DocumentRoot "D:/program Files/apache software Foundation/apache2.2/htdocs" in the file to modify it to DocumentRoot "E:/PHP".
Find <directory "D:/program Files/apache software Foundation/apache2.2/htdocs" in the file > change it to <directory "E:/PHP" >.
One of the green parts of the file location is different from the respective installation Apache location, where the red part is more in the location of the newly modified Web site.
Configure PHP configuration file php.ini and set up PHP's extension package and library files.
Look for the php.ini-development file in the PHP catalog and rename it to duplicate the php.ini file. Open PHP.ini and modify the file information in the internal section.
To set up PHP's corresponding expansion package ext, look for:
; On Windows:
; Extension_dir = "ext"
Modify it to:
; On Windows:
Extension_dir = "D:/php5.4/ext"
Open the corresponding library function, remove the following in front of the library;
Extension=php_curl.dll
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll
Extension=php_xmlrpc.dll
Set the next area, look for:;d Ate.timezone = Modify it to: Date.timezone = Asia/shanghai.
After the configuration is complete, re-activate the Apache test to see if you can restart your success!
Tips: When configuring Apache configuration file httpd.conf, there is a version of the problem, if the test to activate Apache, prompted Error:the requested operation has failed, So the first thing to think about is the Apache version and the PHP repository file version of the inconsistency problem. Apache2.2 the PHP repository file is Php5apache2_2.dll, not php5apache2_4.dll. Php5apache2_2.dll is not available in the php5.5 version, so now installed PHP is the php5.4 version. If you are using Apache5.4, you can completely download the php5.5, as long as the version of the repository contained in Apache is available.
The third step is to create the file index.php and view the PHP configuration information. Create a file index.php under the created Web site root catalogue (e:/php), open and edit the content:
<?php
Phpinfo ();
?>
Open the browser and enter http://localhost/to view the configuration information of PHP.
Well, through the above steps Windows installation configuration PHP environment completed.
If we continue to add Xdebug function, first download the Php_xdebug-2.3.3-5.4-vc9.dll library file, first download the process must find the corresponding PHP version content. After downloading the file, copy the file to the PHP Extension folder (EXT). Then open the PHP root php.ini configuration file to add the next side of the content. Then re-activate Apache and run Phpinfo test.
[Xdebug]
Zend_extension=d:\php5.4\ext\php_xdebug-2.3.3-5.4-vc9.dll
Xdebug.profiler_enable=on
Xdebug.auto_trace=on
Xdebug.collect_params=on
Xdebug.collect_return=on
Xdebug.show_exception_trace = On
Xdebug.remote_autostart = On
Xdebug.remote_enable = On
Xdebug.collect_vars = On
Windows installation PHP Environment