This guide is compatible up to version 1.0.7 of the Write Back Extreme extension.

Introduction

This document describes the necessary steps to install and deploy the Write Back Extreme (WBE) extension in IIS with a connection to a MS SQL server database.

The installation is tested on servers already running for years and also after a clean install of Windows Server. It is advised to install WBE on a dedicated server. But can be installed/added to an existing server running IIS with other websites. In the latter case, you might run into conflicting situations which need to be addressed by your friend in the IT department.

1. Prerequisites

Make sure you meet all requirements listed below before you continue with this guide:

  1. Windows Server 2012 R2, 2016 or 2019 Standard Edition
  2. WBE package, provided by Apps for Tableau/Infotopics
  3. MS SQL Server database available with a (sys) admin user-account for the desired database.

2. Installation

  • Install IIS (via Programs and Features). Only select/check IIS; nothing else.
  • Install Web Platform Installer 5.1 (WPI) when opening ‘IIS Manager’
  • Start WPI and install:
    • PHP 7.4.1 (x64) (or PHP 7.4.1 x64 for IIS Express)
    • Microsoft Drivers 5.8 (x64) for PHP 7.4 for SQL Server in IIS/IISExpress
    • Application Request Routing 2.5 with KB2589179
    • URL rewrite 2.1 (might be already installed)
    • IIS: CGI
  • Set system environment variable: BOX_REQUIREMENT_CHECKER to value 0 (zero). If you don’t know where to change this, look at: windows-R: sysdm.cpl -> advanced tab ->environment variables -> section ‘System Variables’ -> New.
  • Run the following command in a dos-cmd-box:
Copy to Clipboard
  • When the command shows an error message about missing DDL’s (see error message below), install Microsoft Visual C++ Redistributable for Visual Studio 2019 (VC_redist.x64.exe) (see documentation).

  • A reboot maybe necessary (advised anyway) after these installs.

3. Check and change ‘php.ini’ settings

Now, we’ll need to make some changes to the ‘php.ini’ file. This file is located in the PHP installation folder, so the location depends on the PHP installation type you chose.

TIP: make a copy of the ‘php.ini’ file each time before editing. Mark your copy by adding a date-timestamp in the name. For example: ‘php.ini.20201201_1522’ or ‘php_20201201_1522.ini’.

The ‘php.ini’ file is located in the PHP installation folder. To find out what the installation folder is, open a dos-cmd-box and run:

Copy to Clipboard

If ‘PHP Manager’ is available in IIS, you can check if you are using the same version in IIS compared to the version in the dos-cmd-box (see additional information) . They should be the same. Make your changes accordingly.

Manual changes to ‘php.ini’

Copy to Clipboard

Error to console instead of logfile:

Copy to Clipboard

At the bottom, add ‘fileinfo’ and ‘sqlsrv’ dll’s to be loaded. Probably on ‘fileinfo’ have to added:

Copy to Clipboard

PHP uses a number of settings for temp and upload folders. Make sure the ‘Users’ group (all users) have uplifted security on these folders with ‘Modify’ Permission. Folders like your system %TEMP% and %TMP% (probably ‘C:\Windows\Temp’), and the PHP ‘sys_temp_dir’, ‘session.save_path’ and ‘upload_tmp_dir’.

4. IIS Configuration

  1. Unzip the WBE extension zip file to the desired web-root location
  2. Add a new website for WriteBack-Extreme in IIS
  3. Create bindings with the desired URL with a valid SSL-certificate
  4. Add the URL for the WriteBackExtreme web-application in your DNS
  5. Document folder (‘physical path’) is the ‘public’ folder from the unzipped WBE archive
  6. Enable the DELETE and PUT method in IIS:

This might get complicated when WBE is mixed with other websites. Especially ones using WEBDAV. WEBDAV blocks DELETE and PUT.

Basic configuration of the WBE website for the usage of DELETE and PUT is fairly easy. Select the WBE site in IIS and double-click ‘Handler Mappings’, then select ‘PHP_via_FastCGI’:

Click ‘Request Restrictions’ and the ‘Verbs’ tab. Add ‘.DELETE,PUT’ as highlighted.

When trying to save the changes, please enclose the exe-pathname for php with double-qoutes (as highlighted).

5. Configuring Write Back Extreme extension

  • Create ‘.env’ in the document root for WBE (not the ‘public’ folder; 1 up). Hint: in a ‘dos-cmd-box’ with:  ‘copy .env.example .env’. See an example .env file below.
Copy to Clipboard

The database user-account needs ‘creator’ permissions.

  • Uplift the security settings on the folder ‘storage’ and ‘migrations’ for the group ‘Users’ to ‘Modify’ Permissions. If these folder do not yet exist, you can create them with lowercase names.
  • Create a LICENSE within the root of the WBE project: Touch LICENSE; vim LICENSE (and paste license file)
  • Check your server on common issues (from inside a dos-cmd-box while in the web-root of WBE):
Copy to Clipboard
  • Open een dos-cmd-box  and execute the following commands:
Copy to Clipboard

* The ‘Trex’ file is also downloadable when you are logged in into the ‘backend’ of WBE. Just click on your profile button in the right-top of the browser screen and select ‘Download .trex’.

6. Testing

Main URL:
https://<your-wbe-url

Get Info about your webserver environment:
https://<your-wbe-url/info

Web application backend:
https://<your-wbe-url/backend/

  • Following the backend URL, you should be able to login with the first (admin) user that was created in step 5.

Now you can start using the Write Back Extreme extension!

Additional information and troubleshooting

This part of the guide contains some additional information that might help you with the installation. If you encounter anything during the installation that cannot be solved with one or more answers below, please contact us and we’ll update the guide for future users!

Installing components with Web Platform Installer – ‘PHP manager IIS’ and ‘Cache Extension’ fail to install

The fact that ‘PHP manager IIS’ and ‘Cache Extension’ fail to install, does not effect the proper functionality of the WBE extension.

Creating a site in IIS

When creating a site in IIS, use the following settings:

Which version of PHP am I running?

Open a dos-cmd-box and run:

Copy to Clipboard

PHP version

C:\Windows\system32>php –version
PHP 7.4.1 (cli) (built: Dec 17 2019 19:23:59) ( NTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Write permission on %TEMP%

The WBE extension needs permission to write to ‘c:\windows\temp’. Uplift security settings for group ‘Users’ of this folder to ‘Modify’ permissions.

Where to find PHP error log

Could be in ‘C:\Windows\Temp\PHP74x64_errors.log’. But it should actually not be there, as in php.ini ‘error_log’ should have been commented out (unset).

Errors in the browser?

Try using a different browser and/or a different workplace or user. If the problem persists, run the browser with the debugger (F12) on the network tab and collect error information.