Home  >  Article  >  Backend Development  >  iis8+php environment setup problems

iis8+php environment setup problems

WBOY
WBOYOriginal
2016-08-08 09:22:191117browse

First use this article to set up the environment

http://jingyan.baidu.com/article/5bbb5a1b35511c13eba17912.html

Then an error is reported: Unable to run

New solution for win8.1 system IIS appears "HTTP error" 500.0, C:phpphp-cgi.exe - FastCGI process unexpectedly exited"


Then I found this article

http://www.yishimei.cn/network/505.html

Then it was solved

Expand another article on PHP environment construction

Students who learn website construction and server environment configuration often use the IIS that comes with the windows system. Under normal circumstances, the windows system only supports the combination of IIS+asp or aspx by default, but there are At that time, our website program was in PHP, so we needed to use the PHP+mysql environment. This combination is more common in the Linux environment, but what should we do if we don’t understand Linux technology and don’t have a Linux system at hand? ? Of course, we need to find a way to make the IIS that comes with the windows system support the PHP+Msql environment. In fact, there are already many such tutorials on winxp and win7 systems, but there are not many tutorials on win8/8.1 systems, so Today, the editor of Yimei Network will explain in detail how to build an IIS+PHP+Msql+phpMyAdmin environment on the win8/8.1 system with illustrations and explanations!

Preparation tools: win8/8.1 system, PHP program, mysql database and database visual management tool phpMyAdmin.

Step 1 of the tutorial, add the IIS function on the win8/8.1 system

This tutorial has been taught to you before, please refer to: Detailed explanation of how to install and enable the IIS function on the win8.1 system

Step 2 of the tutorial, download and configure PHP Program

64-bit PHP program download: http://windows.php.net/downloads/releases/php-5.6.5-Win32-VC11-x64.zip

32-bit PHP program download: http://windows. php.net/downloads/releases/php-5.6.5-Win32-VC11-x86.zip

Please explain here, you can download as many php programs as your system has. I am a 64-bit system, so I downloaded it. It is a 64-bit php program.

After downloading the compressed package, unzip it to the C drive, then rename the folder to php, such as C:php, then find the php.ini-development file inside and copy it to the desktop.

After copying it to the desktop, rename it to php.ini. Then open it with Notepad: (Find the following items through Ctrl+F)

Modify the time zone:

date.timezone = "Asia/Shanghai" (remove the ";" sign in front of it)

Activate the extension:

extension=php_gd2.dll (Remove the first ";" sign)

extension=php_mbstring.dll (Remove the first ";" sign)

extension=php_mysql.dll (Remove the first ";" sign Remove)

extension=php_mysqli.dll (remove the first ";" sign)

extension=php_pdo_mysql.dll (remove the first ";" sign)

Configure the dll file path:

extension_dir = "C:phpext" (remove the leading ";" sign)

After modifying the above items, save the php.ini file and copy it to C:Windows.

Step 3 of the tutorial, configure IIS and enable it to support php

Open Control Panel - System and Security - Administrative Tools - Internet Information Services (IIS) Manager - Handler Mapping, as shown in the figure below:

iis8+php environment setup problems

Double-click "Handler Mapping",

iis8+php environment setup problems

After opening it, find "Add Module Mapping" on the right, click to open it, as shown below:

iis8+php environment setup problems

Fill in *.php in "Request Path", and select FastCgiMoudle for "Module" , select "C:phpphp-cgi.exe" for "Executable File", fill in PHP for "Name" and click "OK".

iis8+php environment setup problems

Just click "Yes".

After this configuration, IIS already supports php extensions. Now we have to add default documents "index.php", "default.php", etc. to the website.

iis8+php environment setup problems

OK, the php configuration has been completed, now let’s test the results. We create a new notepad file index.txt in the root directory of the website (my website root directory: C:inetpubwwwroot), and then enter , after saving, change the file extension to php, which is index.php, and then open localhost or 127.0.0.1 in the browser, if the php version, system version, etc. appear The information indicates that the php environment is perfectly configured successfully.

Let me tell you something here: When creating a new notepad, be sure to check whether the extension .txt is displayed. If it is not displayed, go to the setting to display the file extension first. The system default is not to display. Otherwise, the changes will be in vain.

If the problem "HTTP Error 500.0 - Internal Server Error C:phpphp-cgi.exe - FastCGI process unexpectedly exited" occurs during operation, please first check whether the visual C++ 2012 or 2013 runtime library is installed on your computer. If it is not installed, please install the vc++ runtime library first and then troubleshoot the problem.

32-bit Microsoft Visual C++ Redistributable 2012 Download: http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x86.exe

64-bit Microsoft Visual C++ Redistributable 2012 download: http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x64.exe

For details, please refer to: New solution for win8.1 system IIS "HTTP error 500.0, C:phpphp-cgi.exe - FastCGI process unexpectedly exited"

Tutorial step 4, download, install and configure the Mysql database

32-bit mysql download address: http://dev.mysql.com/get /Downloads/MySQL-5.6/mysql-5.6.22-win32.zip

64-bit mysql download address: http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.22-winx64. zip

is the same as the PHP program. You can install as many MySQL databases as your system has. Mine is a 64-bit system and I use 64-bit MySQL.

The installation process is very simple, just unzip and install it. I won’t go into details here.

Let PHP support the mysql database extension, copy C:Program FilesMySQLMySQL Server 5.5liblibmysql.dll to the C:WINDOWSSYSTEM32 directory, and restart IIS after the copy is completed.

Step 5 of the tutorial, download, install and configure the database management tool - phpMyAdmin

phpMyAdmin download address: http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.3.8/phpMyAdmin-4.3.8-all -languages.zip

After downloading, unzip it, create a folder named phpMyAdmin on the C drive, and then copy all the contents you just unzipped to phpMyAdmin.

Then create a virtual directory in IIS pointing to C:phpMyAdmin.

Then we can detect the results of all our labor above. Open the browser and enter http://localhost/php in the address bar:

iis8+php environment setup problems

If the display is as shown in the picture above, congratulations, you succeeded! Start your website journey now!


The above introduces the issues of setting up the iis8+php environment, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn