How to Install PHP 5 for IIS 6
How to Install PHP 5 for IIS 6
Step by step guide on how to install IIS6 and PHP5 on Windows XP or Windows Server 2003
Steps

First you must install IIS 6.0. (IIS 5.1 on XP)

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.

IIS 6.0 is now installed. Now you must get the correct files for PHP5. Head over to http://www.php.net/downloads.php and download the zip package 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.

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

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

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

Find SMTP = localhost and make sure it is un-commented. If your mail server is somewhere else you may specify it here. Also set this line just below the above: sendmail_from = [email protected]

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

Set the line "extension_dir" as "extension_dir = "C:\PHP\ext".

Uncomment all of the following items.extension=php_mssql.dllextension=php_msql.dllextension=php_mysql.dllextension=php_mysqli.dllextension=php_java.dllextension=php_ldap.dllextension=php_iisfunc.dllextension=php_imap.dllextension=php_filepro.dllextension=php_gd2.dllextension=php_gettext.dllextension=php_dba.dllextension=php_dbase.dllextension=php_dbx.dllextension=php_mbstring.dllextension=php_pdf.dllextension=php_pgsql.dllextension=php_sockets.dllextension=php_xmlrpc.dllextension=php_xsl.dllextension=php_zip.dllThe 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.

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".Install PHP 5 for IIS 6 Step 11Bullet1.jpg Now add "C:\PHP;" to the very beginning.Install PHP 5 for IIS 6 Step 11Bullet2.jpg Now go to start > run > type: regedit and click OK.Install PHP 5 for IIS 6 Step 11Bullet3.jpg 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.Install PHP 5 for IIS 6 Step 11Bullet4.jpg From the IIS Manager, click on the hostname of your server in the Connections panel on the left.Install PHP 5 for IIS 6 Step 11Bullet5.jpg Double-click on the Handler Mappings icon.Install PHP 5 for IIS 6 Step 11Bullet6.jpg From the Handler Mappings Actions panel, click on Add Module Mapping.Install PHP 5 for IIS 6 Step 11Bullet7.jpg

Type the following information into the appropriate text boxes, and then click OK. Request path: *.phpInstall PHP 5 for IIS 6 Step 12Bullet1.jpg Module: FastCGImoduleInstall PHP 5 for IIS 6 Step 12Bullet2.jpg Executable: C:\php\php-cgi.exeInstall PHP 5 for IIS 6 Step 12Bullet3.jpg Name: FastCGIInstall PHP 5 for IIS 6 Step 12Bullet4.jpg Click OK, and then click Yes.Install PHP 5 for IIS 6 Step 12Bullet5.jpg In the left panel, click on your server's hostname, and then double-click on the Default Document icon.Install PHP 5 for IIS 6 Step 12Bullet6.jpg From the Actions panel on the right, click Add.Install PHP 5 for IIS 6 Step 12Bullet7.jpg 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: You should now see the PHP information page at http://localhost/phpinfo.php.

What's your reaction?

Comments

https://rawisda.com/assets/images/user-avatar-s.jpg

0 comment

Write the first comment for this!