1. Download the installation package
Address can be found online, I downloaded the php-5.6.27-win32-vc11-x64.zip
2, unzip the installation package, my decompression to D:\tools\php5.6
3, Configuration PHP.ini
In the extracted directory, locate the php.ini file, and if you do not have this file, you can copy the php.ini-development in the directory.
The file is named PHP.ini
A. Setting the time zone Date.timezone = PRC
B. Set the encoding Default_charset = "UTF-8"
C. Set the short label Short_open_tag = On
D. Setting the extension directory Extension_dir = "ext"
Some of the above settings may have been set up, but the front added ";" Comments, can be directly put ";" Remove.
E. Open the module, and the preceding ";" removed to support different functions. The functions that need to be turned on are as follows:
Extension = Php_bz2.dll
Extension = Php_curl.dll
Extension = Php_fileinfo.dll
Extension = Php_gd2.dll
Extension = Php_gettext.dll
Extension = Php_mbstring.dll
Extension = Php_mysql.dll
Extension = Php_mysqli.dll
Extension = Php_openssl.dll
Extension = Php_pdo_mysql.dll
Extension = Php_sockets.dll
Extension = Php_xmlrpc.dll
Extension = Php_zip.dll
4. Configure Environment variables
Append d:\tools\php5.6;d:\tools\php5.6\ext to the PATH variable
5. Install Apache HTTP Server
A. Download the installation package, I downloaded the httpd-2.4.23-x64-vc14-r3.zip
B. Unzip the installation package, my location is D:\tools\Apache24
C. Modify the configuration file httpd.conf, in D:\tools\Apache24\conf, change the following:
Define srvroot "/apache24" changed to Define srvroot "D:/tools/apache24"
<ifmodule dir_module>
DirectoryIndex index.html
</IfModule>
Switch
<ifmodule dir_module>
DirectoryIndex index.html index.php default.php index.htm
</IfModule>
At the end of the file, add support for PHP
# PHP5 Support
LoadModule Php5_module D:/tools/php5.6/php5apache2_4.dll
AddType application/x-httpd-php. php. html. htm
# Configure the path to PHP.ini
Phpinidir "d:/tools/php5.6"
Save the file.
D. Using the cmd command, execute D:\tools\Apache24\bin\httpd.exe-k install to add Apache to the system service
On the cmd command line, enter Services.msc to open the System Services console and you can see the Apache2.4 service you just added.
6. Start Apache Server
A, before starting the Apache server, for insurance purposes, you can go to D:\tools\php5.6 to perform a php.exe to ensure
The configuration is installed correctly. The possible problem with this process is that Msvcr110.dll is not installed, resulting in php.exe execution failure.
This time, it is necessary to install Msvcr110.dll, you can find on the Internet, http://www.microsoft.com/zh-CN/download/details.aspx?id=30679
can be downloaded, suitable for their own computer.
b, using the cmd command, httpd.exe-k start to launch the Apache server, or through ApacheMonitor.exe to start
Apache Server (this requires Apache to be added to the system service first). Double-click the ApacheMonitor.exe program.
The problem with this process may be that there is no installation of Vc_redist.x64.exe, the Visual C + + Runtime library.
If there is a problem with Php5apache2_4.dll not loading to the server, it is likely that PHP will not start properly, or
The httpd.conf is not configured correctly.
Using the cmd command httpd.exe-k start, you can specify the error message in the window.
I met the above two problems, if there are different, you can search the Internet.
Note: PHP and Apache version must be consistent, such as I use the php5.6, in the installation directory has Php5apache2_4.dll
Then Apache will need to choose the 2.4 version.
PHP Execution Environment Deployment configuration under Windows 64-bit environment