1. Download PHP7
Select the thread safe version, if it is a 64-bit system to download x64, x86 not
2. Unzip to the directory you want to install
3.apache Configuration
1) Add PHP module
Find the section "Dynamic Shared Object (DSO) support". It's probably around 62 lines. and append the following code at the end:
LoadModule Php7_module D:/wangshuyi/php7/php7apache2_4.dll
2) Add extension
Find the section "AddType". Approximately 409 lines near, and append the following current code at the end:
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps
3) Specify the php.ini configuration file path
In the httpd.conf file, specify the directory of the PHP configuration file php.ini, where the httpd.conf file is located in the end, in the last line of text to add the following code:
Phpinidir "D:/WANGSHUYI/PHP7" (Here "D:/WANGSHUYI/PHP7" for the actual path of your php.ini file)
4) Configuration DirectoryIndex
Find the "DirectoryIndex" section, about 282 lines, append a "index.php" to the back of the DirectoryIndex
4. Configure PHP.ini
First, rename the php.ini-production in the PHP installation directory to php.ini
Open PHP.ini and make the following changes:
1) Set the extension path for PHP
Find Extension_dir = "ext" and remove the semicolon from the front
2) Turn on common PHP extensions, such as:
Extension=php_mbstring.dll (PHP Multi-byte string extension)
Extension=php_mysql.dll (MySQL library extension)
Extension=php_mysql.dll (mysqli Library extension)
Open mode: Find the above extension, the previous semicolon (;) to delete the line.
3) Set the default time zone
Date.timezone = Asia/shanghai
Open mode: Find the above extension, the previous semicolon (;) to delete the line
Well, here's the procedure for installing configuration PHP7.0 on a Windows server, let's test it.
Iv. Testing
Create a new index.php in your Apache site directory (it can be another name, of course).
Open with a text editor (Notepad, for example), add the following code inside, save
<?php
Phpinfo ();
?>
If the configuration is successful
PHP7 Installation and Apache