Home > Article > Backend Development > Summary of configuring PHP running environment in IIS7.X_PHP tutorial
1. First download PHP. Here I downloaded php5.2.14 (if it is other higher versions, you may not be able to find php5isapi.dll, and the related configuration methods will not be discussed for now). It is recommended to download the zip package without installation. That's ok, and when downloading, please be sure to select the VC9 package instead of VC6 (this is used by apache). For example, I extracted it to d: php-5.2.14-Win32.
2. Find php.ini-dist and change it to php.ini, then open the file:
Findregister_globals = Off
is modified to register_globals = On,
Findextension_dir = "./"
Change to the path of the extension dll in your compressed package. For example, mine is d: php-5.2.14-Win32ext, so change it to extension_dir = "d: php-5.2.14-Win32ext"
Add an extension that will
;extension=php_curl.dll
;extension=php_dbase.dll
;extension=php_gd2.dll
;extension=php_ldap.dll
;extension=php_mysql.dll
Remove the preceding semicolon ";" to enable these commonly used extensions.
3. Build a website in iis, for example: PHPTest, an application pool will be added by default, change the .NetFramework version in the application pool to "Unmanaged code", and change the managed pipeline mode For "Classic". Then add application mapping to the website, add a script mapping, the request path is "*.php", and the executable file is "D:php-5.2.14-Win32php5isapi.dll "(Depending on the directory where php is located).
Now you can run your php site. For example, create a file named "index.php" in the root directory of the website, add "" and the following interface will appear after running: