Activate PHP (X64) under Windows 2008 R2 and IIS 7.5 using ISAPI
A short description how to activate PHP5 (X64) under IIS7.5 (Windows 2008 R2 X64):
One thing before: I found some solutions in which it was explained how to activate PHP5 with FastCGI – these solutions didn’t work for me so I decided to use the “old” Isapi way.
1. Download a PHP X64 Version (for example from http://fusionxlan.com/PHPx64.php (php-5.2.5-x64-2007-11-12.zip))
2. Extract the files to a temporary folder
3. Copy everything that is inside of the extracted folder “php-5.2.5 (x64)” to a new folder (for example) “C:php”
4. Activate the “ISAPI IIS Role Service” with the Server Manager (or the power shell)
5. Rename the file “C:phpphp.ini-recommended” to “php.ini”
a. Open the php.ini and change the following things:
i. Activate the option “open_basedir” and point it to the folder where the website(s) files are located.
ii. Activate the option “extension_dir” and point it to a folder where the PHP extensions can be found. In a typicall installation it would be:
extension_dir = “./ext”
iii. Activate the required php extensions (uncomment the needed “lines”) for example:
extension=php_mssql.dll
extension=php_mysql.dll
b. To test if the PHP installation is successful, run the following from the command line prompt:
C:PHP>php –info
If everything is correct a lot of php infos are displayed now.
6. Open Internet Information Services (IIS) Manager from the Startmenu
8. Choose: “Add Module Mapping”
9. Add the following entries:
a. Request path: „*.php“
b. Module: „IsapiModule“
c. Executable: „C:phpphp5isapi.dll“
d. Name: „PHP via Isapi“
e. Confirm with „OK“
10. Allow the „Isapi extension“
11. For testing if the mapping works correctly creat a file called “phpinfo.php” in C:inetpubwwwroot. Insert this code into the file:
<?php phpinfo(); ?>
12. Now you can open the phpinfo file in a WebBrowser:
or if you are logged on to the web server:
You will now see the default php Info page:
13. Finished – now you can use php scripts in your IIS 7.5 under Windows 2008 R2 64 Bit