faqts : Computers : Programming : Languages : PHP : Installation and Setup : Web Servers : Microsoft Internet Information Server (IIS)

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 8 people (63%) answered Yes
Recently 5 of 8 people (63%) answered Yes

Entry

PHP: Install: How to install PHP v5 on Microsoft Internet Information Server (IIS)?

Apr 5th, 2007 02:20
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 26 March 2021 - 11:00 pm ----------------------
PHP: Install: How to install PHP v5 on Microsoft Internet Information 
Server (IIS)?
---
Steps: Overview:
 1. -Download the PHP program (e.g. v5.1.4 or higher)
       http://www.php.net/downloads.php
       php-5.1.4-win32-installer.zip
     1. -Do not download the .msi file, but the .zip file, as it
         contains e.g. the necessary (e.g. php5isapi.dll) files)
     2. -Create a directory
          c:\PHP
     3. -Unzip the file in this directory
 2. -Add the path to <your PHP directory> to the Microsoft
     Windows PATH environment variable
     1. -Click button Windows 'Start'
     2. -Select from list 'Control panel'
     3. -Double click on icon 'System'
     4. -Click button 'Advanced'
     5. -Click button 'Environment variables'
     6. -Select from list 'System variables'
     7. -Click button 'Edit'
     8. -At the end *append*
          ;<path to your PHP directory>
         E.g.
          ;c:\PHP\
 3. -Copy the file
      php.ini-recommended
     to
      php.ini
     in <your PHP directory>
 4. -Edit in <your PHP directory> the file
      php.ini
     1. -E.g.
           c:\PHP\php.ini
     2. -Set doc_root to the directory of your Microsoft Internet 
Information Server (IIS)
         1. -E.g.
              c:\Inetpub\wwwdir
     3. -Possibly set the extension_dir to
          "<your PHP directory>/ext"
         1. -E.g.
              "./ext"
     4. -Save this file
 6. -Change the settings of IIS
     1. -Add the '.PHP' extension in 'Home Directory' in IIS
         1. -Right click on 'Default web site'
         2. -Select tab 'Home Directory'
         3. -Click button 'Configuration'
         4. -Click button 'Add'
             1. -Choose php5isapi.dll in executable field
                  1. -E.g.
                       c:\PHP\php5isapi.dll
             2. -Choose extension
                  .php
                 (include the dot '.' in front of php)
         5. -Note:
             1. -In PHP v5 you will have to give the *short filename*
                 (or install it in c:\php, instead of c:\program
                 files\php) when choosing the .php dll
                 Thus not
                  c:\program files\php\php5isapi.dll
                 but e.g.
                  c:\progra~1\php\php5is~1.dll
                 otherwise you will get an error
                (because it does not like spaces in the file path)
                'The specified module can not be found'
                and or
                 'HTTP 500 internal server error'
             2. -You do usually not also have to install a PHP ISAPI
                 filter (only if you also want HTTP authentification)
             3. -Only if you use Microsoft Windows 2003 Server, add a
                 new PHP 'Web Service extension' in IIS (otherwise you
                 get a HTTP 404 error)
 7. -Restart IIS
     1. -E.g. right click on 'default web site', click 'stop'
         and then 'start'
 8. -Test if PHP is installed correctly
     1. -Copy a .PHP page in the c:\Inetpub\wwwroot directory
     2. -E.g.
          <?php
             phpinfo();
          ?>
     3. -Start your web browser with that .PHP page
          http://localhost/<your PHP filename>
         1. -That should show e.g. variables known to PHP
===
Tested successfully on
Microsoft Windows XP Professional (service pack 2),
running
Microsoft Internet Information Server (IIS) v5.1,
PHP v5.1.4
===
Internet: see also:
---
----------------------------------------------------------------------