IIS-PHP on Windows 8/8.1


To totally unlock this section you need to Log-in


Login

Internet Information Services (IIS) – formerly called Internet Information Server – is a web server application and set of feature extension modules created by Microsoft for use with Microsoft Windows. IIS supports HTTP, HTTPS, FTP, FTPS, SMTP and NNTP. It is an integral part of the Windows Server family of products, as well as Windows 8. IIS is not turned on by default when Windows is installed.

Windows 8 and 8.1 comes with IIS but you have to install it , and process is really easy.

Steps

Install/Enable .NET Framework 2 and .NET Framework 3.5 and then open Control Panel and go to Programs and Features:

IIS and PHP on Windows 8/8.1

Click on Turn Windows Features On or OFF and then check Internet Information Service and choose Server Options:

IIS and PHP on Windows 8/8.1

IIS and PHP on Windows 8/8.1

Click on OK and wait until it finish installing: open browser and go to http://localhost and you will see default IIS page:

IIS and PHP on Windows 8/8.1

Now we will begin downloading and installing PHP for Windows from here http://windows.php.net/download/.

Now extract the downloaded .zip archive (for example in C:\php or in C:\Program Files\php). Then download PHP Manager for IIS (it's an extension for managing PHP from IIS control panel), from http://phpmanager.codeplex.com/.

Features of PHP Manager:

  • Register PHP with IIS.
  • Validate and properly configure existing PHP installations.
  • Run multiple PHP versions side by side on the same server and even within the same web site.
  • Check PHP runtime configuration and environment (output of phpinfo() function).
  • Configure various PHP settings.
  • Enable or disable PHP extensions.
  • Remotely manage PHP configuration in php.ini file.
  • Easily install, configure, manage and troubleshoot one or many PHP versions on the same IIS server.

Note that only IIS versions 7.0 and above are supported. After installation is complete, launch the IIS Manager and find the "PHP Manager" feature:

IIS and PHP on Windows 8/8.1

When opened, the "PHP Manager" feature provides a configuration overview for the PHP installation that is registered with IIS and is currently active. If no PHP is registered with IIS, then the only action that can be performed is the registation of a new PHP version.

Registering PHP in IIS

To register a new PHP version with IIS, first you need to download the zip archive with PHP binaries from http://windows.php.net/ and then extract the files from it into a folder of your choice. Note that you can also install PHP by using Web Platform Installer or the Windows installer from http://windows.php.net/ - the PHP Manager can be used to manage those PHP installations as well.

Click on "Register new PHP version" task and then provide the full path to the location of the main php executable file: php-cgi.exe:

IIS and PHP on Windows 8/8.1

After clicking OK the new PHP version will be registered with IIS and will become active. This means that all the sites on this IIS server by default will use this PHP version.

Validating existing PHP installations

In order for PHP to run properly on IIS there is a set of recommended settings that need to be configured in IIS and PHP. PHP Manager checks if all of the recommended settings are configured correctly. If some settings are not configured properly then you can use PHP Manager to fix those settings.

When some configuration settings are configured incorrectly you will see a warning message when you open PHP Manager:

IIS and PHP on Windows 8/8.1

After clicking on "View Recommendations" link you can see all the configuration issues that exist in your PHP installation. You can review each issue description and the recommended corrective action. You can also select which configuration issues you want to be fixed:

IIS and PHP on Windows 8/8.1

Switching between PHP versions

After multiple PHP versions have been registered with IIS, you can use PHP Manager to easily switch between the versions on a server and site level. This means that you can configure some IIS sites to use one PHP version, while other sites use different version.

IIS and PHP on Windows 8/8.1

Checking PHPINFO() output

phpinfo() function in PHP provides very detailed information about all aspects of PHP runtime configuration. To check the phpinfo() output from within PHP Manager use the "Check phpinfo()" task.

IIS and PHP on Windows 8/8.1

Configuring Error Reporting

You can use PHP Manager to configure error reporting level in PHP. If IIS is used on a development machine then you may want to use verbose error reporting in order to see all the errors, warnings and notices from your PHP application right away. If IIS is used as a production server, then error reporting level is less verbose and errors are logged in a log file, but never communicated to HTTP client.

IIS and PHP on Windows 8/8.1

Runtime Limits

Various timeouts and limits can be configured in the "PHP Runtime Limits" page:

IIS and PHP on Windows 8/8.1

Configuring all PHP settings

All existing PHP settings can be added, removed and modified in the "PHP Settings" page.

IIS and PHP on Windows 8/8.1

Enabling and Disabling PHP extensions

PHP extensions can be enabled or disabled in the "PHP Extensions" page:

IIS and PHP on Windows 8/8.1

Download

The download associated to this article will be available only to registered users on Heelpbook.
[wpfilebase tag="file" id="240"]

1 thought on “IIS-PHP on Windows 8/8.1”

Comments are closed.