How to install PHP on IIS

PHP installation on IIS 7.0 (Windows VISTA)
I will not explain how to do it, just see this good article:
http://blondr.blogspot.com/2006/11/set-up-iis-7-w-mysql-and-php-5.html
It includes also the settings for MySQL and php session' permission.


PHP installation on IIS 5.1

1) add to path c:\PHP
2) rename php.ini-recomended to php.ini

doc_root = c:\inetpub\wwwroot // for IIS/PWS
doc_root = c:\apache\htdocs // for Apache
extension_dir = "c:\php\ext"
cgi.force_redirect = 0
set browscap to c:\windows\system32\inetsrv\browscap.ini

If you want to use the CGI binary, do the following:

* Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
* Change the Execute Permissions to 'Scripts only'
* Click on the 'Configuration' button, and choose the Application Mappings tab. Click Add and set the Executable path to the appropriate CGI file. An example PHP 5 value is: C:\php\php-cgi.exe Supply .php as the extension. Leave 'Method exclusions' blank, and check the 'Script engine' checkbox. Now, click OK a few times.
*

Set up the appropriate security. (This is done in Internet Service Manager), and if your NT Server uses NTFS file system, add execute rights for I_USR_ to the directory that contains php.exe / php-cgi.exe.

To use the ISAPI module, do the following:

* If you don't want to perform HTTP Authentication using PHP, you can (and should) skip this step. Under ISAPI Filters, add a new ISAPI filter. Use PHP as the filter name, and supply a path to the php4isapi.dll / php5isapi.dll.
* Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
* Change the Execute Permissions to 'Scripts only'
* Click on the 'Configuration' button, and choose the Application Mappings tab. Click Add and set the Executable path to the appropriate ISAPI DLL. An example PHP 5 value is: C:\php\php5isapi.dll Supply .php as the extension. Leave 'Method exclusions' blank, and check the 'Script engine' checkbox. Now, click OK a few times.
* Stop IIS completely (NET STOP iisadmin)
* Start IIS again (NET START w3svc)
3) add user rights to php directory (IIS user - modify, IUSR_MASNINENAME - read)

No comments:

Post a Comment