Speaking of PHP environment configuration and installation, usually Apache with PHP configuration, as the PHP version is constantly updated, the Windows IIS platform support is getting better, the Windows IIS platform to configure the installation of PHP environment is also more convenient.
After setting up the APACHE+PHP+MYSQL environment on Windows 7, I configured the PHP5.2 and PHP5.3 on the Windows 7 IIS7 platform, PHP5.3 the previous version in Windows The PHP configuration on the IIS platform is mainly done in ISAPI mode, While PHP5.3 supports IIS to run PHP in fastcgi mode, these two PHP5 versions have a very different configuration installation, the following is a detailed introduction to ISAPI and fastcgi two ways to make PHP configuration on IIS.
Preparatory work
Before completing the PHP5 installation configuration on IIS, you first need to download PHP5.2 and php5.3,php5.3 to php-5.3.2-win32-vc9-x86, download the address please refer to the PHP environment: Windows7 apache+php +mysql a article.
Windows7 IIS7 Installation
Before you make the IIS7 PHP installation configuration, you first need to install iis7,windows7 default and do not install IIS, the installation process is as follows:
First into the Control Panel , click on the program and function , and then click on the left to turn on and off Windows features , check the Internet information Services can host the Web core to determine the installation.
After completing the installation, check the Internet Information Service and choose to install the necessary IIS features. Note Because the IIS7 is configured with ISAPI and fastcgi in the configuration of PHP5.2 and PHP5.3, the CGI and ISAPI extensions and ISAPI filters must be checked (here because I first configure PHP5.2 in ISAPI, I do not check CGI), as shown in the figure:
Install IIS7
After you complete the installation of Windows7 IIS7, you can see the Internet Information Services Manager option in the Administrative Tools in Control Panel.
How do I configure PHP5.2 on Windows7 IIS7 on an ISAPI basis?
IIS7 PHP5.2 Configuration The first step: php.ini configuration
Decompression Php-5.2.13-win32-vc6-x86.zip, renamed to Php52iis, copy it to the C-packing directory, php.ini-list file name to php.ini, open php.ini configuration, php.ini Configuration and PHP environment build: Windo Ws7 Apache+php+mysql Basically the same, note that Extension_dir directory pointing must be accurate, that is
1
|
Extension_dir = "C:/php52iis/ext" |
In addition, there is no date.timezone option in the PHP5.2 version, so no setup is required.
After completing the php.ini configuration work in PHP5.2, copy it to the C:\WINDOWS directory, while Libmcrypt.dll,libmysql.dll,php5ts.dll three files under the Php52iis directory to C:/windows The/system32 directory.
IIS7 PHP5.2 Configuration Step Two: Configure PHP5.2 in ISAPI mode
Open IIS, select the ISAPI filter in the default Web site under the Web to work with PHP configuration, that is,
To add an ISAPI filter, select the corresponding DLL file in PHP
Then select the handler mapping to add a script mapping operation, i.e.
Add script map operation
After completing the above IIS7 PHP5 configuration, it is necessary to explain that the default IIS7 under the site, its bound port is 80 ports, the site directory for%systemdrive%\inetpub\wwwroot, if you like me before this installation configured apache+ PHP environment, you need to modify the default Web site binding port and site directory, such as the 80 port to 8080, the site Directory point to D:\PHPWeb. Or add a new Web site, add the application pool first, and then add a Web site.
Add Application Pool
Add a new site
Add default Document
When you are finished adding new sites, make sure that you have added script mappings in the handler mappings, and if not, repeat the script mapping operation.
IIS7 PHP5.2 Configuration Step Three: Restart the IIS7 server
Create a new index.php file under the D:\PHPWeb directory, which reads
Enter http://localhost:8080/in the browser to view PHP5.2 configuration information.
The installation of the configuration PHP5.2 on the Windows7 IIS7 is complete.
How do I configure PHP5.3 in fastcgi mode on Windows7 IIS7?
Configure PHP5.3 on Windows7 IIS7, mainly in fastcgi configuration, basically the same as the PHP5.2 configuration. First unpack the php-5.3.2-win32-vc9-x86, rename it to Php53iis and copy it to the C-packing directory.
IIS7 PHP5.3 Configuration Step One: Add a Web site
For additional procedures, refer to the configuration of the IIS PHP5.2.
IIS7 PHP5.3 Configuration Step Two: Add fastcgi module mapping
Click on the handler mapping to add the module operation, namely
Configure IIS to run in fastcgi mode PHP5.3
IIS7 PHP5.3 Configuration Step three: PHP.ini configuration
First rename the php.ini-development to PHP.ini and set the
1 2 3
|
Fastcgi.impersonate=1 defaults to 0, if you use IIS, you need to open Cgi.fix_pathinfo=1 Cgi.force_redirect=0 is turned on by default, if you use IIS, you can turn it off |
Second, specify Extension_dir directory and Date.timezone, i.e.
1
|
Extension_dir = "C:/php53iis/ext" |
1
|
Date.timezone= Asia/shanghai |
The other php.ini configurations are the same as the PHP5.2 configuration, except that when you configure PHP on Windows7 IIS7, you do not need to copy php.ini and other files to C:/windows and c:/windows/system32 directories, much simpler.
IIS7 PHP5.3 Configuration Step Fourth: Restart the IIS7 server
You can also access http://localhost:8080/.
FastCGI process quits unexpectedly how to resolve?
In the PHP configuration installation using Windows7 IIS7, if the PHP configuration is not correct, there will be fastcgi process unexpected exit error message, you can use the DOS
Debug view, the general will be a PHP configuration error message, you only need to modify the relevant PHP configuration can be based on this information.
At this point on the Windows7 IIS7 platform for PHP5.2 and PHP5.3 configuration installation work is introduced, it should be said with the increase in PHP version, PHP configuration work is increasingly simplistic.
Note : PHP Web Development Tutorials-leapsoul.cn Copyright, reproduced in the form of links to indicate the original source and this statement, thank you.