| Installing and configuring PHP on IIS 7 using FastCGI |
| Windows - IIS |
| Monday, 11 May 2009 00:00 |
|
We'll be installing and configuring PHP 5.2.6 with IIS 7.0 using the FastCGI module, as a prerequisite for this tutorial you'll need Windows Server 2008 or Windows Vista with FastCGI installed.  Note. FastCGI does not come as standard on Vista and will need to be installed first. First Download PHP 5.2.6 non-thread safe windows 32 binary zip file. http://www.php.net Extract the zip file, to a folder of your choice for example: C\php Change the name of the php file from phpini-recommend to php.ini Open up php.ini and search for the following occurrences of fastcgi: //fastcgi.impersonate Un-comment this and set it equal to 1 for example: fastcgi.impersonate = 1 //cgi.fix_pathinfo Un-comment this and set it equal to 1 for example: cgi.fix_pathinfo = 1 //cgi.force_redirect = 0 Un-comment this and set it equal to 1 for example: cgi.force_redirect = 1 Next search for basedir, and un-comment it and insert the location of your php applications. open_basedir --> put in the physical location of your php applications for example: open_basedir = "c:\myphpfiles Save php.ini Now you need to add a handler mapping to instruct IIS 7 to pass all PHP requests through FastCGI Open up IIS 7 and go into handler mappings > add module mapping Need to add the following configurations: request path: *.php Module: FastCgiModule Executable: C:\{location of your php.ini file}\php-cgi.exe Name: PHP via FastCGI So in our case: It would be: Executable: C:\myphpfiles\php-cgi.exe When you are done click ok, when asked if you would like to create a FastCGI app for this executable select Yes Hey Presto PHP is set up to use FastCGI on Windows Server 2008 or Vista SP1. |
| Last Updated on Saturday, 13 June 2009 22:47 |
Comments (1)
Vista SP1
1
Saturday, 13 June 2009 08:13
simianman
I think it is important to note that you need to have Vista SP1 for this to work.




































