Reference http://www.myhack58.com/Article/sort099/sort0100/2012/35579.htm This article, you can!
I wrote "Windows installation php5.4+apache2.4+mysql5.5" Installation tutorial, the local implementation is very simple, but some people still like to use IIS to configure the PHP environment, some friends found me to ask me how to configure the PHP environment under IIS, Why follow the online tutorial configuration is not successful. So I'm going to briefly talk about the configuration of IIS and PHP, the configuration of the database is skipped.
Attention:
The PHP5.3 version does not start with the ISAPI extension on IIS6, and there is no php5isapi.dll in the PHP file, instead Php5nsapi.dll, in other words PHP5.3 later version will no longer use ISAPI extension in IIS run, there is no way to let PHP5.3 run in IIS, of course, it is fastcgi.
So many of the online tutorials with the ISAPI extension configuration PHP You can not look at, because you simply cannot configure the up.
Choose the version of PHP:
FastCGI execution is performed in a single thread, so there is no need for thread security checks, but the protection of thread security can improve execution efficiency, so fastcgi to execute PHP, it is recommended to choose the non thread safe version.
The first part: preparation work.
Because there is no windows2003 environment, so I use the Windows XP sp3,2 configuration is identical.
1.windows installs the IIS component, which is skipped here.
2. Install the fastcgi.
Web version of the online installation (of course, there is also a download version, look for themselves)
3. Download php5.4.8.
Part II: Install the configuration PHP.
1. Unzip the zip archive of the downloaded PHP package. For example, put in d:/.
Copy the Php.ini-development file under 2.d:/php and change the file name to PHP.ini.
3. Modify the PHP configuration file php.ini, save it.
Line No. 730; Extension_dir = "ext" First go to the front semicolon and change to Extension_dir = "D:\php\ext"
Line No. 919;d ate.timezone = First go to the front semicolon and change to Date.timezone = Asia/shanghai
Line No. 743: cgi.force_redirect = 1 First go to the front semicolon and change to Cgi.force_redirect = 0
Line No. 771; fastcgi.impersonate = 1 Remove the preceding semicolon
Line No. 783: cgi.rfc2616_headers = 0 first go to the front semicolon and change to Cgi.rfc2616_headers = 1
Other configurations should be changed according to your needs. (mainly remove the semicolon in front of the Gd,mbstring,mysql three extension libraries)
Part III: Configuring FASTCGI.
1. Modify the configuration file Fcgiext.ini, which is installed by default under the C:\WINDOWS\system32\inetsrv folder.
At the end of this file, add the following code to save.
php=php [PHP] Exepath=d:\php\php-cgi.exe
2. Configure IIS to support FastCGI.
Web site---Properties---home directory---Configuration to add a new ISAPI item.
Executable file: C:\window\system32\inetsrv\fcgiext.dll
Extension:. php
Support index.php Default page
To configure Wencheng, restart IIS.
4. Testing
Write info.php:
<?php
Phpinfo ();
?>
Browser input test, problems occurred:
Error message
FastCGI Error
The FastCGI Handler was unable to process the request.
Error number:14001 (0X800736B1).
Error Description: The application failed to start due to an incorrect application configuration. Reinstalling the application may correct the problem.
HTTP Error 500–server error.
Internet Information Services (IIS)
Workaround:
The key to the error is that the VC9 runtime is not installed as Visual C + + 2008
Microsoft Visual C + + Redistributable Package (x86):
Http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=zh-cn
It can be used normally after installation.
Install iis6+php under Windows Server 2003