Installing PHP 5.3 on IIS 6 and SQL Server

Things you need before Installation

This post assumes that you have that IIS 6.0 running on Windows 2003. In case you need assistance, refer to this website Installing IIS 6.0. Before getting started, we need the following tools:

Installation

  1. Install both FastCGI and Visual C++ 2008 Package.
  2. Unzip and extract PHP to C:\php (For the rest of the post, I will refer to it as the PHP directory)
  3. Inside the PHP directory you will find a file named php-production.ini, create a copy of this file and rename it to php.ini
  4. Open the php.ini to make the following changes. Uncomment the lines by removing the semicolon (;) and update the values.
    extension_dir = "C:\php\ext"
    error_log="C:\inetpub\temp\php-errors.log"
    cgi.force_redirect = 0
    fastcgi.impersonate = 1
    fastcgi.logging = 0
    cgi.fix_pathinfo=1
  5. Now to configure FastCGI, Open the command prompt and move to the folder C:\Windows\System32\inetsrv
  6. Execute the following three commands:
    cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe"
    cscript fcgiconfig.js -set -section:"PHP" -InstanceMaxRequests:10000
    cscript fcgiconfig.js -set -section:"PHP" -EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000
  7. Restart IIS and test if PHP is running
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s