Skip to main content
Version: 7.0

DEB

Preparation for update

info

If Passwork is installed in a cloud/virtual environment, create a snapshot to restore functionality in case of incorrect PHP update

Obtain root privileges and update the local package database:

sudo -i 
apt-get update

Removing PHP

Disable the module for Apache2:

a2dismod php8.2

Remove the main package, drivers, and PHP extensions:

apt purge -y php8.2*

Clean the system from dependencies:

apt autoremove -y --purge

Installing PHP

Install PHP with extensions and drivers:

apt-get install -y php8.2 php8.2-dev php8.2-ldap php8.2-xml php8.2-bcmath php8.2-mbstring php8.2-xml php8.2-curl php8.2-opcache php8.2-readline php8.2-zip

Installing PHP MongoDB driver

Install the PHP MongoDB driver:

apt install php8.2-mongodb -y

Create configuration files to load and enable PHP MongoDB:

echo "extension=mongodb.so" | tee /etc/php/8.2/apache2/conf.d/20-mongodb.ini
echo "extension=mongodb.so" | tee /etc/php/8.2/cli/conf.d/20-mongodb.ini

Installing PHP Phalcon extension

Install the PHP Phalcon extension:

mkdir /tmp/install && cd /tmp/install && curl -LOf https://github.com/phalcon/cphalcon/releases/download/v5.3.1/phalcon-php8.2-nts-ubuntu-gcc-x64.zip && unzip phalcon-php8.2-nts-ubuntu-gcc-x64.zip && cp phalcon.so /usr/lib/php/20220829 && cd / && rm -rf /tmp/install

Create configuration files to load and enable PHP Phalcon:

echo "extension=phalcon.so" | tee /etc/php/8.2/apache2/conf.d/30-phalcon.ini
echo "extension=phalcon.so" | tee /etc/php/8.2/cli/conf.d/30-phalcon.ini

Force enable PHP for Apache2 and switch the alternative version for executable files:

a2enmod php8.2
update-alternatives --set php /usr/bin/php8.2
update-alternatives --set phar /usr/bin/phar8.2
update-alternatives --set phar.phar /usr/bin/phar.phar8.2

If HTTPS connection to Passwork is used, you need to edit the configuration file /etc/php/8.2/apache2/php.ini, specifically the line — session.cookie_secure = * session.cookie_secure = 1

sed -i '/session.cookie_secure =/c session.cookie_secure = On' /etc/php/8.2/cli/php.ini

Restart the web server service:

systemctl restart apache2.service