First, the package to be prepared:
Operating system: Windows Server 2003 Enterprise Edition (X86)
1, Microsoft Visual C + + 2008 Redistributable Package (x86)
http://www.microsoft.com/zh-cn/download/details.aspx?id=29
Http://download.microsoft.com/download/7/5/0/7502f4e9-1f90-4895-9259-1bde67b8b9a1/vcredist_x86.exe
Microsoft Visual C + + 2008 Redistributable Package (x64)
http://www.microsoft.com/zh-cn/download/details.aspx?id=15336
2, FastCGI 1.5 for IIS 6 and 5.1 (x86)
Http://download.microsoft.com/download/E/0/C/E0C0709A-66E5-4113-9A6C-A5F65BF6717D/fcgisetup_1.5_rtw_x86.msi
FastCGI 1.5 for IIS 6 and 5.1 (x64)
Http://download.microsoft.com/download/6/0/2/60237D55-DABA-4FF1-921B-786E0A968049/fcgisetup_1.5_rtw_x64.msi
3. NET Framework 2.0 (x86)
Http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe
Http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x64.exe
Http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_ia64.exe
4, PHP 5.3 (5.3.26)
http://windows.php.net/download/
There are several different versions to choose from when downloading. That's VC6 X86 and VC9 X86.
(1), VC6 is legacy Visual Studio 6 compiler, is compiled using this compiler. If you are using apache+php under Windows, please select the VC6 version;
(2), VC9 is the Visual Studio 2008 compiler, is compiled with the Microsoft vs Editor. If you are using iis+php under Windows, please select the VC9 version;
(1), Non thread safe is not threading safety;
(2), Non thread safe is threaded safety;
The authorities do not recommend that you apply non thread safe to the production environment, so we chose the PHP version of the thread safe to use.
Second, installation steps:
1. Installation of the top 3 documents
2. Extract Php-5.3.26-nts-win32-vc9-x86.zip files to
C:/php/
3. Installation of fastcgi files can be found in Internet Information Services (IIS) Manager (default is prohibited, double-click or click the button to allow)
Configuring Fcgiext.ini Files
Edit the
C:/WINDOWS/system32/inetsrv/fcgiext.ini
file, at the end of the increase
代码如下 |
复制代码 |
[Types] php=PHP [PHP] ExePath=C:/php/php-cgi.exe |
You can also add more configurations like the following
代码如下 |
复制代码 |
InstanceMaxRequests=10000 ActivityTimeout=300 RequestTimeout=300 EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000,PHPRC:ExePath=C:/php/ext
|
Configuring PHP.ini Files
1. Copy c:/php/php.ini-development file and rename it to PHP.ini
2. Modify the php.ini file, before the option ";" Remove the number (note that the file path is correct.) )
The code is as follows |
Copy Code |
extension=ext/php_gd2.dll extension=ext/php_mbstring.dll extension=ext/php_mysql.dll extension=ext/php_mysqli.dll extension=ext/php_pdo_mysql.dll extension=ext/php_pdo_sqlite.dll extension=ext/php_sqlite.dll extension=ext/php_sqlite3.dll
[Date]
; Http://php.net/date.timezone
Date.timezone = Asia/shanghai
Upload_max_filesize = 20M
|
Configuring PHP Extension support for IIS
Web site-Properties-Home Directory-configuration-Add (the following image is selected as "Default Web site", ignore, the operation method is the same)
Executable file: [C:/windows/system32/inetsrv/fcgiext.dll]
Limit to: [Get,head,post]
Create a text file, save the code as index.php