Step 2: Installing and Configuring PHP

These instructions assume that:

  1. Download PHP from the MassTransit Latest Releases web page.
  2. Extract the zip file into a new folder called php—for example, C:\php. It is strongly recommended that you create the PHP folder on the same drive where your operating system is installed. Installing PHP on a different drive will prevent MTWeb from working properly.

    Warning: Don't use the PHP installer. Only extract the zip package as stated above.

    Note: If you don't see all of the required PHP files mentioned below after using Stufflt Expander, try extracting the zip file with another application.

    Windows Server 2008 R2 Service Pack 1 is the oldest Windows Server version that PHP 7.x supports. If your Windows Server version is older, you have to use PHP version 5.5.x or lower. PHP version 7.x requires that you have Microsoft Visual C++ Redistributable for Visual Studio 2015 x64-bit installed.

    Windows Server 2003 and Windows XP are the oldest Windows versions that PHP 5.5.x supports. PHP version 5.5.x requires that you have Microsoft Visual C++ Redistributable for Visual Studio 2012 x86 or x64-bit installed.

  3. To configure your PHP settings, you can use a sample configuration file called php(<version>).ini. These files are included in the \MassTransit Server\Extras folder. Choose the <version> for this file according to your MassTransit version. For more information on which is the appropriate one for your system, refer to System Requirements.

    This file is preconfigured with standard settings. Make a copy of it and paste it to the PHP installation folder (in this example, C:\php). Rename the file to php.ini.

    Note: You can edit the php.ini file in a standard text editor (for example, Notepad). Any changes in this file require a restart of your web server.

    Warning: If you have PHP already installed and running other websites, don't use the preconfigured php(<version>).ini file. Instead, configure your current php.ini file (usually found in your C:\Windows or C:\php folder) according to the instructions in Step 2: Upgrading and Configuring PHP.

  4. Open the PHP installation folder (in this example, C:\php), and create a folder called tmp. Grant the Windows user account associated with the IIS web site that MassTransit will use (usually, IUSR) Write access to the new tmp folder.

    Note: There is a known issue with PHP, which may require that you set up additional permissions. For more information, refer to this knowledge base article: https://kb.acronis.com/node/47136

  5. Navigate to the WebRoot folder. By default, it is located in \MassTransit Server\MTWeb\.
  6. Grant the Windows user account associated with the IIS website that MassTransit will use (generally, IUSR) Write permissions for the MT-PHPLog.log file.

    Note: If the Write permissions are not set, MassTransit users may encounter problems such as seeing "Internal Server Error 500" in their browser. This behavior may vary by browser.

  7. Verify that the php_mysqli.dll file is included in the C:\php\ext folder.
  8. Confirm that the PHP installation folder has appropriate system permissions. To do so:
    1. Locate the folder. In this example, C:\php.
    2. Right-click the folder and select Properties.
    3. In PHP Properties window, select the Security tab.
    4. Confirm that the machine's Network Service user has Read, Execute, and List permissions for the PHP installation folder.

      Note: The Network Service user rarely shows up explicitly, but is a member of the Users group. Depending on the security structure for a particular machine, you may want to add the Users group to the PHP folder (and propagate permissions to the files and folders within it), or add only the Network Service user.

PHP setup is now complete.

Note: For more information on installing PHP on Windows, refer to http://www.php.net/manual/en/install.windows.php.

Note: To increase the MassTransit web performance, you can use the Windows Cache Extension for PHP. You can find its installation file at http://sourceforge.net/projects/wincache/files/wincache-1.1.0/wincache-1.1.0-5.3-nts-vc9-x86.exe/download. For instructions on how to set Windows Cache Extension for PHP, refer to http://us3.php.net/manual/en/wincache.installation.php.
Please use the link above. Don't use the Windows Platform Installer because it will install a conflicting copy of PHP.