In windows, the most common php method must be supported. One is to run apache independently, and the other is to load php files through iis, so that the iis server can support both php and asp, asp.net. Next I will introduce how to enable iis to support php configuration.
If no package is prepared, go
PHP5.2.17 official download: http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.zip
PHP5.3.5 official download: http://windows.php.net/downloads/releases/php-5.3.5-Win32-VC9-x86.zip
First, install IIS7 and check the three items.
Note: CGI will be used in IIS7 + PHP_5.3.5 Environment
ISAPI extension and ISAPI filter used in IIS7 + PHP_5.2.17
Add PHP support for IIS below
IIS7 + PHP_5.3.5
1. decompress the downloaded php_5.3.5 to the C: php Directory (you can also put it elsewhere, but modify it later)
2. Rename php. ini-development to php. ini.
3. modify php. search for data in ini. change timezone to date. timezone = "Asia/Shanghai" (This must be changed here, otherwise a warning will be reported) find Windows Extensions to enable the required modules, such as php_curl.dll php_mysql.dll php_mysqli.dll php_xmlrpc.dll php_curl.dll. You just
4. Add <module ing>
The path here is based on your actual situation.
5. Create a New phpinfo. php text file in the root directory of the website. The content is:
<? Php
Phpinfo ();
?>
6. Test. Open the browser and check the result: localhost/phpinfo. php. If you can see a page similar to the following, it means you have succeeded:
Now we can successfully run the PHP program.
IIS7 + PHP_5.2.17
The isapi extension and isapi filtering have been selected before IIS is installed. You do not need to add a role service here.
Modify the php. ini file first ..
Put php under c: php. ini-dist (the display extension must be set first) and renamed to php. ini, open it in notepad and find extension_dir = ". /", and then put. /change to c: php (modify the path based on your actual situation)
1. Add an application pool
2. Add isapi and cgi restrictions
3. Add an isapi filter
4. Add script ing
5. Test (phpinfo. php has been created before). Open localhost/phpinfo. php as before to check the effect: