Jump to content
xisto Community
Sign in to follow this  
longtimeago

Running A Php Webserver On Iis All you Need to know

Recommended Posts

I just now Successfully configured a PHP ennabled webserver at home so thought of sharing it with you , may be useful for some.

Pre-requesities:

Must have IIS installed on your system.You must have the PHP Binariy file, you can get it directly from the Quoted link below,please be aware that there are many 3rd parties who provide php Binaries and this tutorial is not for those

Direct Download From
(http://php.net/downloads.php).

Lets have the tutorial Step by step so that if you have any error during installation you can quote the Line number to clarify your doubt.

Step 1 :
Extract all of the files from the zip file ( which you got from http://php.net/downloads.php ) into C:\PHP ( Here PHP is the Folder name which is assigned , remember that if you run IIS on D:\ or any other drive create and extract the files onto that drive, dont have big paths like keeping the PHP folder into another folder etc. )

Step 2 :
Open System Properties. For this ----- > Right-Click on My computer ----- > choose "properties". Go to ----- > Advanced tab----- >click the "Environment Variables".
Now here you can see two sections in the Environment Variables window, User Variable and System Variables. Look into the System Variables You will find the variable path.
Select it and then select Edit which is available below the System Variables window.

Step 3:
Now add php to the variable here do not delete anything on this line. Go to the end of the line you will find a semicolon . After the semicolon, type: C:\PHP ( Drive depends where you have extracted the ZIP file ) and then click OK. Now click OK on the Environment Variables window. Click OK on the System Properties window


Step 4:
Restart the computer to make the Environment Variables changes.To proceed to this step Restart is a must.
Once Restarted .. Proceed from here ..
Go to In C:\PHP you Search for php.ini-recommended ,and rename it from php.ini-recommended to php.ini. Now PHP has been installed, Now we have to configure our IIS Server with PHP


Step 5:
----- >Open IIS ----- >Under Home Directory: Set Execute Permissions to Scripts Only----- >Click on configuration.. ----- >Click Add ----- >Set executable to C:\PHP\php5isapi.dll ----- >Set extension to .php ----- >Click OK ----- >Click Apply, then OK. ----- >Under ISAPI Filters Click Add ----- >Set Filter Name to PHP ----- >Set Executable to C:\PHP\php5isapi.dll ----- >Click OK. ----- >Click Apply, then OK.

Now Restart the Webserver that is IIS.

Thats it done,you have successfully configured PHP on your IIS and now all .php files can be executed on your server.
Just Take a Simple php file and drop it into wwwroot and access it through the browser via localhost/myphpfile.php, Thats it done .

If you have anyyy Queries please post it here I will be happy to attend ..(Quote the step number please when you have doubts)

Share this post


Link to post
Share on other sites

Thank you for nice tutorials. But Making Php webserver in home is much easy what you describe above. Anyone can make webserver at home just double click installer. Go WAMP or XAMP for Windows . You will get apache server with php and mysql database.

Share this post


Link to post
Share on other sites

Thank you for nice tutorials. But Making Php webserver in home is much easy what you describe above. Anyone can make webserver at home just double click installer. Go WAMP or XAMP for Windows . You will get apache server with php and mysql database.

XAMP is php for Apache Server only, this tutorial is strictly for IIS because IIS does not come with a default php installed,so inorder to run php on IIS this configuration is a must

Share this post


Link to post
Share on other sites

I just now Successfully configured a PHP ennabled webserver at home so thought of sharing it with you , may be useful for some.
Pre-requesities:

Must have IIS installed on your system.You must have the PHP Binariy file, you can get it directly from the Quoted link below,please be aware that there are many 3rd parties who provide php Binaries and this tutorial is not for those

Direct Download From
(http://php.net/downloads.php).
Lets have the tutorial Step by step so that if you have any error during installation you can quote the Line number to clarify your doubt.

Step 1 :
Extract all of the files from the zip file ( which you got from http://php.net/downloads.php ) into C:\PHP ( Here PHP is the Folder name which is assigned , remember that if you run IIS on D:\ or any other drive create and extract the files onto that drive, don't have big paths like keeping the PHP folder into another folder etc. )

Step 2 :
Open System Properties. For this ----- > Right-Click on My computer ----- > choose "properties". Go to ----- > Advanced tab----- >click the "Environment Variables".
Now here you can see two sections in the Environment Variables window, User Variable and System Variables. Look into the "System Variables" You will find the variable "path".
Select it and then select "Edit" which is available below the System Variables window.

Step 3:
Now add php to the variable here do not delete anything on this line. Go to the end of the line you will find a semicolon . After the semicolon, type: C:\PHP ( Drive depends where you have extracted the ZIP file ) and then click OK. Now click OK on the Environment Variables window. Click "OK" on the System Properties window


Step 4:
Restart the computer to make the Environment Variables changes.To proceed to this step Restart is a must.
Once Restarted .. Proceed from here ..
Go to In C:\PHP you Search for php.ini-recommended ,and rename it from php.ini-recommended to php.ini. Now PHP has been installed, Now we have to configure our IIS Server with PHP


Step 5:
----- >Open IIS ----- >Under Home Directory: Set Execute Permissions to Scripts Only----- >Click on configuration.. ----- >Click Add ----- >Set executable to C:\PHP\php5isapi.dll ----- >Set extension to .php ----- >Click OK ----- >Click Apply, then OK. ----- >Under ISAPI Filters Click Add ----- >Set Filter Name to PHP ----- >Set Executable to C:\PHP\php5isapi.dll ----- >Click OK. ----- >Click Apply, then OK.

Now Restart the Webserver that is IIS.

That's it done,you have successfully configured PHP on your IIS and now all .php files can be executed on your server.
Just Take a Simple php file and drop it into wwwroot and access it through the browser via localhost/myphpfile.php, That's it done .

If you have anyyy Queries please post it here I will be happy to attend ..(Quote the step number please when you have doubts)

i think you should post this in the tutorial section
anyways, thanks for the tutorial :D
Edited by fadillzzz (see edit history)

Share this post


Link to post
Share on other sites
Why It gives Me CGI Timeout!!!??Running A Php Webserver On Iis

Thank you for your nice tutorial, but to my side things did not go well

I followed all the instructions as you outlined but when I typed LOCALHOST/mdee.Php it keep searching until it display this message on the browser:

CGI Timeout

The specified CGI application exceeded the allowed time for processing. The server has deleted the process.

Now what could be the reason for that?

mdee.Php is the php test file I created and save it as mdee.Php, the following are the php codes I wrote in mdee.Php:

<?php  echo "My Name Is Munir Mdee";?>

 Please help me on this please!!  thanks in advance.

-question by Munir Mdee

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.