2. Configure PHP

Applies to the following products: 
Questionmark Perception
Applies to the following Perception versions: 
Perception 5.7

If you're interested in running a more recent version of PHP 5.5 or PHP 5.6, you can download and install Perception 5.7 Service Pack 4, which adds support for more recent versions of PHP 5.5 as well as PHP 5.6 and PHP 7.

Once you have installed the software prerequisites that that Perception requires, you will need to configure PHP 7.1.19 or a later 7.1.x version so that it works with Perception and at peak performance. You will need to:

In some instances, if FastCGI hasn't been enabled, you will not be able to enable or disable extensions. For instructions on how to enable FastCGI, please refer to Enable FastCGI Support in IIS 7 on Windows Server 2008, Windows Server 2008 R2, Windows Vista, or Windows 7.

Enable the relevant PHP extensions

  1. Launch Internet Information Services (IIS) Manager (not Internet Information Services (IIS) 6.0 Manager).
  2. Select your server from the Connections list on the left.
  3. In the Features View pane, locate and double-click PHP Manager.
  4. Under PHP Extensions, click Enable or disable an extension.
  5. Ensure that the following extensions are enabled:
    • CURL (php_curl.dll)
    • SOAP (php_soap.dll)
    • XSL (php_xsl.dll)
    • php_mbstring.dll
    • php_gd2.dll
    • OpenSSL if planning to run Perception using SSL via HTTPS (php_openssl.dll)
  6. To enable an extension:
    • Select it from the disabled list.
    • Click Enable from the Actions pane.

Configure PHP settings

  1. Launch IIS Manager.
  2. Select  your server from the Connections list on the left.
  3. In the Features View pane, locate and double-click PHP Settings.
  4. Under PHP Settings, click Manage all settings.
  5. Ensure the following settings are configured:
    • To edit a setting, select the setting, and click Edit... from the Actions pane.
    • To add a setting, click Add... from the Actions pane.
      Setting Value Section
      cgi.fix_pathinfo 1 PHP
      cgi.force_redirect 0 PHP
      error_log C:\Windows\Temp\php.log PHP
      expose_php 0 PHP
      extension_dir "C:\Program Files (x86)\PHP\v7.1\ext\" PHP
      fastcgi.impersonate 1 PHP
      fastcgi.logging 0 PHP
      max_execution_time 300 PHP
      max_input_vars 2000 PHP
      memory_limit 256M PHP
      post_max_size 20M PHP
      realpath_cache_size 5M PHP
      realpath_cache_ttl 1800 PHP
      session.save_path C:\Windows\Temp PHP
      upload_max_filesize 20M PHP
      upload_tmp_dir C:\Windows\Temp PHP
      zend_extension php_opcache.dll PHP
      sendmail_from [user@yourdomain.xyz] Mail function
      smtp_port 25 Mail function
      SMTP [Your SMTP server IP address] Mail function
      opcache.cli_enable 1 opcache
      opcache.enable 1 opcache
      opcache.enable.cli 1 opcache
      opcache.file_cache C:\Questionmark\PHP\caches\opcache opcache
      opcache.file_cache_only 0 opcache
      opcache.interned_strings_buffer 16 opcache
      opcache.max_accelerated_files 25000 opcache
      opcache.memory_consumption 256 opcache
      opcache.revalidate_freq 4 opcache
      opcache.validate_timestamps 1 opcache

Configure the FastCGI instances

If FastCGI has not been enabled on your server, please refer to Enable FastCGI Support in IIS 7 on Windows Server 2008, Windows Server 2008 R2, Windows Vista, or Windows 7 for instructions on how to enable it.

Now, you will need to carry out some configuration changes to ensure that PHP is tuned for use with Perception. To do this:

  1. Launch IIS Manager.
  2. Select your server from the Connections list on the left.
  3. In the Features View pane, locate and double-click FastCGI Settings.
  4. Select the PHP entry, and click Edit... from the Actions pane.
  5. Ensure that the Instance MaxRequests setting is set to 10000.
  6. The Max Instances setting needs to be set to 10 times the number of processors you have on the server. For example, if your server has 2 processors, the Max Instances would be 20. If you server has 4 processors, the Max Instances should be 40.
  7. The Activity Timeout setting should be set to 120.
  8. The Idle Timeout setting should be set to 300.
  9. The Request Timeout setting should be set to 140.
  10. Click OK.

PHP has now been configured and is ready to use.

After you have enabled the relevant extensions and configured the FastCGI instances, continue on to step 3 using the link below.