This installation refers to the information on the Internet, the final collation of the content for this installation is involved in the section.
First, prepare the installation material:
1. Download from http://windows.php.net/download/5.6.19 Thread-safe version (using Apache with a thread-safe version required)
2. Download the VC11 Runtime installation package from https://www.microsoft.com/en-us/download/details.aspx?id=30679
3. Download the VC14 Runtime installation package from http://www.microsoft.com/en-us/download/details.aspx?id=48145
Second, install and configure PHP and Apache
1. Install the runtime first: Install with the downloaded VC11 and VC14 installation packages
2. Unzip the PHP and Apache compression package into a directory: D:\env\Apache24 D:\env\php56
3. Modify the Apache configuration file D:\env\Apache24\conf\http.conf and let Apache load the PHP module when it starts.
The sections that need to be modified are as follows:
(1) root directory
ServerRoot "D:/env/apache24"
(2) Remove the # before the ServerName ( function here?) )
ServerName www.example:80
(3) Modify the DocumentRoot path
DocumentRoot "D:/env/apache24/htdocs"
<direcotry "D:/env/apache24/htdocs" >
(4) Modify Direcotryindex configuration
DirectoryIndex index.php index.htm index.html
(5) Set Serverscript directory
--360 Line
scriptalias/cgi-bin/"d:/env/apache24/cgi-bin/"
--376 Line
<directory "D:/env/apache24/cgi-bin" >
AllowOverride None
Options None
Require all granted
</Directory>
(6) Added support for PHP configuration
# PHP5 Support
LoadModule Php5_module D:/env/php56/php5apache2_4.dll
AddType application/x-httpd-php. php. html. htm
# Configure PHP.ini Path
Phpinidir "D:/env/php56"
(7) test configuration
Find the index.html file from D:/env/apache24/htdocs
Body part increase <?php phpinfo ();? >
Then launch the Apache httpd service from the command line:
Go to cmd, switch to D:\env\Apache24\bin directory and enter httpd return
If there is no error, the boot succeeds and the browser is used to connect to the http://localhost
The configuration succeeds if the following is displayed.
。。。 Add the MySQL configuration process later.
php5.6.19+apache2.4.18 Environment Configuration