how to host php on IIS 7.5

Php application can be hosted on IIS web server by using FastCGI Module that can be found in IIS. Here I am using Windows 7 as my IIS web server. Same is for server 2008 R2. Remember R2 has IIS ver7.5 ditto Windows 7.

First you  need to install IIS in your server, make sure that you have installed CGI feature while installation.

addorremoveCGI

Now you need to Install and Configure the php to run for IIS.

You may go to http://www.php.net/downloads.php and download the php zip file for windows.

Unzip the downloaded file somewhere like C:\php . Now rename the php.ini-recommanded to php.ini .

Now eopne php.ini and then uncomment and modify to following:

set fastcgi.impersonate = 1

Set cgi.force_redirect=0

Set cgi.fix=pathinfo=0

open_basedir and edit to your desired directory

Set extension_dir to the directory where php extension reside in this case C:\php\ext

Enable following by uncommenting:

extension=php_mssql.dll

extension=php_mysql.dll 

Here your Configuration part is over. Now you need  to handle to php Request. As I have mention before we will be using FastCGI for this purpose here.

Open your IIS manager. “inetmgt” Now double click on “Handle Mappings”

handle

Now add Module Mapping and point phpCGI.exe for php files.

Now here what you need to do.

module mapping

You will get a dialogue box stating FastCGI application. Click on “Yes” and you are good to go for php apps.

You may want to create a php info file in wwwroot  folder like this <?php phpinfo(); ?> and test.

test

:-)

Posted: 02-21-2010 6:00 AM by gandip with 2 comment(s)

Filed under:

Comments

# guest test title @Friday, January 27, 2017 10:56 AM

guest test post

[url=http://googlee.te/]bbcode[/url]

<a href="http://googlee.te/">html</a>

http://googlee.te/ simple

Guestquoft

# viagra online pharmacy @Tuesday, February 21, 2017 6:13 PM

j <a href=" http://canpharm.win/#cpep ">buy cheap medications online</a> viagra, <a href=" canadianpharmacyon.link ">canada pharmacy online no script</a> viagra nitric oxide, <a href=" online-pharmacy.review ">canada pharmacy drugs prices</a> best viagra

GregorySmedy

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Protected by FormShield
Refresh
Listen
Please enter the characters shown on the image


Code: