1) Download and Install IIS 6.0 on your computer.

2) On Windows XP, Go to your control panel > add remove programs. Click on "Add/Remove Windows Components". Place a check for "Internet Information Services". On Windows7 go to Start -> Control Panel -> Programs and Features -> Turn Windows Features On or Off. Make sure that all the options showed on the below image are checked.


3) IIS 6.0 is now installed. Now you must get the correct files for php5. Download the zip package from here under "Windows Binaries" Do not get the installer! In addition, while you are here you will need to get the "Collection of PECL modules" also under Windows Binaries.


4) Once Downloaded extract the first file you downloaded and place the files in "C:\php". Extract the PECL modules to "C:\php\ext".


5)Rename C:\php\php.ini-recommended to C:\php\php.ini and then COPY it to C:\Windows

6Open both the php.ini file you have now and uncomment cgi.force_redirect in php.ini and set it to 0


6Open both the php.ini file you have now and uncomment cgi.force_redirect in php.ini and set it to 0

7) Find SMTP = localhost and make sure it is uncommented. If your mail server is somewhere else you may specify it here. Also set this line just below the above: sendmail_from = someone@yourhost.com


8) Change session.save_path as "session.save_path=C:\php\sessions" and make the directory C:\php\sessions


10) Uncomment all of the following items.
extension=php_mssql.dll
extension=php_msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_java.dll
extension=php_ldap.dll
extension=php_iisfunc.dll
extension=php_imap.dll
extension=php_filepro.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_dba.dll
extension=php_dbase.dll
extension=php_dbx.dll
extension=php_mbstring.dll
extension=php_pdf.dll
extension=php_pgsql.dll
extension=php_sockets.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
extension=php_zip.dll
The rest require more attention and is out of the scope of this tutorial. Some of the items might not be there. In that case, simply copy the line to your ini file.
11) Now copy all of those DLL files in C:\php\ext to C:\windows\system32 or add "C:\PHP;" to your Windows path. To add php to your Windows path:
Right Click on My Computer and choose properties > Advanced Tab > Click "Environment Variables".

extension=php_mssql.dll
extension=php_msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_java.dll
extension=php_ldap.dll
extension=php_iisfunc.dll
extension=php_imap.dll
extension=php_filepro.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_dba.dll
extension=php_dbase.dll
extension=php_dbx.dll
extension=php_mbstring.dll
extension=php_pdf.dll
extension=php_pgsql.dll
extension=php_sockets.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
extension=php_zip.dll
The rest require more attention and is out of the scope of this tutorial. Some of the items might not be there. In that case, simply copy the line to your ini file.
11) Now copy all of those DLL files in C:\php\ext to C:\windows\system32 or add "C:\PHP;" to your Windows path. To add php to your Windows path:
Right Click on My Computer and choose properties > Advanced Tab > Click "Environment Variables".

Now add "C:\PHP;" to the very beginning.
Now go to start > run > type: regedit and click ok
Add HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath = C:\php to the registry. If you change your windows path instead of copying the dll files then you will need to restart your computer before php will work. Updating php is easier when you add it to your Windows path. So bookmark this page and go restart. Now is the best time since we are done with file placement.
From the IIS Manager, click on the hostname of your server in the Connections panel on the left.
Double-click on the Handler Mappings icon.
From the Handler Mappings Actions panel, click on Add Module Mapping.

12)Type the following information into the appropriate text boxes, and then click OK.
Request path: *.php
Module: FastCGImodule
Executable: C:\php\php-cgi.exe
Name: FastCGI
Click OK, and then click Yes.
In the left panel, click on your server’s hostname, and then double-click on the Default Document icon.
From the Actions panel on the right, click Add.
Enter index.php as the new default document name, and then click OK.
In the left panel, click on your server’s hostname.
In the Actions panel on the right, click Restart.
Create a new text document, and save it as c:\inetpub\wwwroot\phpinfo.php with the following content:<?php phpinfo(); ?>
You should now see the PHP information page at
In the left panel, click on your server’s hostname.
In the Actions panel on the right, click Restart.
Create a new text document, and save it as c:\inetpub\wwwroot\phpinfo.php with the following content:<?php phpinfo(); ?>
You should now see the PHP information page at
http://localhost/phpinfo.php.
No comments:
Post a Comment