Legacy
...
Passwork 4
How to upgrade Passwork 4→5 ve...

Upgrade manual for Passwork 4→5 (Windows Server)

15min

This manual describes how to upgrade Passwork from version 4 to version 5 for Windows Server. Passwork version 5 runs on PHP 8.0, so in addition to updating the source code you will also need to install a new version of PHP.

💡 We recommend that you make a backup of your system before you start the upgrade

Table of contents

1. Installing PHP 8.0

💡 PHP 8.0 specifically needs to be installed. PHP 8.1 is not yet supported.

  1. Check archive properties. Remove the "locked" property if the archive received it when downloading
  2. Unzip archive
  3. Move the folder with the unpacked archive (In this example, the path — C:\Program Files\php8)
  4. Install VC++ Visual C++ Redistributable Packages for Visual Studio:/call

6. Retart the system

2. Adding Extensions Phalcon and MongoDB for PHP 8.0

Download archives with extension files:

Shell

Shell


Check archive properties. Remove the "locked" property if the archive received it when downloading.

Place the extension files in the directory — C:\Program Files\php8\ext

3. Selection of PHP 8.0 as the primary version of PHP for the Passwork site.

1.Download and install PHP Manager for IIS

⬇️ https://github.com/phpmanager/phpmanager/releases/download/v2.7/PHPManagerForIIS_x64.msi

2.Open "IIS Manager" and go to "PHP Manager":

Document image


3.Register PHP version by specifying the path to php-cgi.exe — "Register new PHP version".

4.Configure the path for the logs file "Configure error reporting":

Document image


5. Add the previously unpacked extensions with "Add an extension", and enable the necessary and disable the unnecessary ones with "Enable or disable an extension". The resulting list of extensions:

Document image


4. Edit php.ini

Copy php.ini from version PHP 7, which was installed earlier and change the following lines:

Shell

Document image


5. Download Passwork 5

  1. Download Passwork 5 from your customer portal (https://portal.passwork.pro)
  2. Rename folder C:\inetpub\wwwroot\C:\inetpub\wwwroot-old\
  3. Recreate a new folder C:\inetpub\wwwroot\
  4. Extract the archive and copy the contents to a directory C:\inetpub\wwwroot\

6. Set correct permissions

1.Open IIS Manager, then right click on website and click “Edit permissions”.

Document image


2.Press “Edit”, then “Add” and search for “IUSR” object. Select “IUSR” and grant “Write” permissions then click “Ok” twice.

Document image


7. Copy config.ini

Copy this file C:\inetpub\wwwroot-old\app\config\config.iniC:\inetpub\wwwroot\app\config\config.ini

8. Check configuration

If you are using HTTPS, check if the following setting has been made after updating the PHP version, enable the session.cookie_secure parameter in C:\Program Files\php8\php.ini:

Shell


9. Import URL rewrite rules

Double click on “URL Rewrite” icon. Click “Import rules” and select .htaccess file from website root directory, then click “Open” and “Import” buttons.

Document image


Click “Apply” button once imported.

10. Configure background tasks

Background tasks are jobs that run on the scheduler in the background. For example, LDAP synchronization, loading favicons, and other tasks that require a lot of time, constant execution, or resource allocation.

11. Possible issues and solutions

1.Sometimes, after changing the PHP version in IIS, the settings for index.php disappear. Check if there is an entry for index.php in “Default Document”, if this entry is missing, add it:

Document image


2.We also recommend that you check the PHP log with the path to which you previously specified in php.ini. If you see The session save path [C:\Windows\temp] is not writable error, assign write permissions for this folder to IUSR or NETWORK SERVICE users

3.Make sure that the php_psr.dll, php_mongodb.dll, php_phalcon.dll extensions were available in "PHP Manager" → "PHP Extensions":

Document image