This manual describes how to upgrade Passwork from version 4 to version 5 for CentOS 8. 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.

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

</aside>

<aside> 💡 This installation guide is not suitable for CentOS Linux 8, which expired on December 31, 2021.

</aside>

Table of contents

1**. Updating PHP to PHP 8.0**

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

</aside>

Resetting PHP versions and selecting a repository

dnf module reset php
dnf module list php
dnf module enable php:remi-8.0

Installing PHP and optional extensions

dnf -y install php php-json php-ldap php-xml php-bcmath php-mbstring

2**. Installing the PHP Mongo driver for PHP 8.0**

pecl install -f mongodb
echo "extension=mongodb.so" | tee /etc/php.d/20-mongodb.ini

3**. Installing Phalcon PHP extension for PHP 8.0**

dnf -y install php-mysql libtool pcre-devel php-psr php-curl
git clone -b v5.0.0beta3 --depth=1 "<https://github.com/phalcon/cphalcon.git>"
cd cphalcon/build
./install
echo "extension=phalcon.so" | tee /etc/php.d/50-phalcon.ini
systemctl restart httpd
systemctl restart php-fpm

4**. Updating Passwork source codes**

Clone the repository using your username and password.

cd /var/www
git config --global --add safe.directory /var/www
git fetch
git reset --hard origin/v5
git checkout v5

<aside> 💡 The system will ask for a login and password to the repository, which you can find in your Passwork customer portal. If you don't have access to the client portal, contact us.

</aside>