Home >Backend Development >PHP7 >How to configure php7 on iis7.5 under win7

How to configure php7 on iis7.5 under win7

醉折花枝作酒筹
醉折花枝作酒筹forward
2021-07-08 09:30:222545browse

The company’s business needs. I have been doing PHP development recently. I have never been exposed to this aspect before. My colleagues configured the environment and started typing code. Personally, I prefer to get to the bottom of things, otherwise I will always be confused, so While the project was coming to an end, I reinstalled the computer and found an opportunity to configure the PHP development environment under Windows.

How to configure php7 on iis7.5 under win7

First install PHPMangerForIIS-1.2.0-x64.msi and rewrite_x64_zh-CN.msi. My system is 64-bit, so here is the 64-bit installation. After PHPManagerForIIS is installed, there will be a PHPManager in IIS. However, I have not used this PHPManager in the entire configuration. The latter is probably used for URL rewriting. I don’t quite understand its mechanism, but I don’t need to understand so much for the time being during project development.

Although the native system is 64-bit, in actual development, we found that there were certain problems in writing long strings to mysql in 64-bit php, so we switched to it. 32-bit PHP solves this problem, so I chose to configure 32-bit PHP7 on my computer. Before formally configuring php, you must install another vc_redist.x86.exe. Note that the vc_redist version and the php version must be consistent, otherwise the "fastcgi process unexpectedly exited error" will be reported later.

After the first three installations are packaged, decompress php-7.0.3-win32-VC14-X86.zip to any disk. I decompressed it to the c drive and renamed it to a simpler name. Please note that the path name after decompression should not contain spaces. After unzipping, copy php.ini-development, rename it to php.ini, open php.ini, uncomment php_mysqli.dll, find extension_dir, uncomment it, and set its value to the absolute value of ext in your php path. For example, my path is extension_dir = "C:\php-7.0.3-x86\ext". After modification, save php.ini and copy it to the root directory of php7. Here I copy it to "C:\php- 7.0.3-x86\".

After completing the PHP series, it is time to create IIS. Open IIS and add the PHP website myweb (as a test, you can simply create a phpinfo.php under the website). Open the application pool corresponding to myweb, change it to unmanaged code, and also change ".NET Framework" to "unmanaged code" in "Set application pool default settings". Open "Processing Mapping Program" -> "Add Module Mapping" and fill in the information as shown below.

After filling in, restart iis, access the website and the following interface will appear, indicating that the configuration is successful. At this point, the configuration of PHP for iis7.5 under win7 is completed. I will continue to write a blog about using netbean xdebug to write and debug PHP code. These are some trivial articles recorded by myself, and all readers can comment lightly.

Recommended learning: php video tutorial

The above is the detailed content of How to configure php7 on iis7.5 under win7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete