Windows Server 2008 R2 (x64) IIS7+PHP5.6.30 (FastCGI) environment building
Related software downloads:
1, PHP download address:
http://windows.php.net/downloads/releases/
Install Microsoft Visual C++ 2012 Redistributable Package (x86)
Double-click VC++.exe
2. Install IIS7, pay attention to selecting CGI service when installing
3. Install PHP
Extract php-5.6.30-nts-Win32-VC11-x86 file
Rename the folder to php, copy the php folder to the D package directory
4. Modify PHP.ini
Open D:\php
Copy php.ini-development Save as php.ini
Open php.ini with Notepad
Make the following changes:
extension_dir ="D:\php\ext" #Set php module path
date.timezone = PRC #Set time zone to China time zone
register_globals = On #Open GET data calls
short_open_tag = On #php Support short tags
cgi.force_redirect = 0 #enable php to run as CGI
fastcgi.impersonate = 1;
cgi.rfc2616_headers = 1
The following php extension modules, select open as needed, cancel the previous semicolon to start the corresponding extension module
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_sockets.dll
extension=php_xmlrpc.dll
Remove the ";" in front of the above common components.
6. Configure IIS to support PHP
open IIS
Double-click the computer name on the left under Start Page
Find the IIS section in the middle, you need to rebuild a website Open "handler mapping"
7. After configuration, configure FastCGI settings:
Right-click FastCGI Settings and select Open Features
Right-click "D:\php\php-cgi.exe" and select "Edit":
Monitor changes made to files: D:\php\php.ini
Select the environment variable and click Add to add PHP_FCGI_MAX_REQUESTS with the value set to 10000.
Note: x64php can be used without configuring the program pool, but 32-bit php must be configured for the corresponding site program pool
"Application pool"-Find the same site name of the program pool such as "dvbbs"-"advanced settings" as shown in the figure:
Create and specify the site directory Create an index.php in the folder
,
Add index.php to the default directory
All configured, restart IIS.