Migration to Passwork 7
Upgrade PHP to 8.3
DEB
12 min
basic actions before updating php, if passwork is installed in a cloud/virtual environment, create a snapshot of the virtual state of the os to restore functionality in case of an incorrect update; obtain root permissions and update the local package database shell sudo i apt get update removing php determine the php version shell php v depending on the version of php you are using (8 0 or 8 2), use the following commands to remove the outdated version disable the module for the apache2 web server 8 2 a2dismod php8 2 8 0 a2dismod php8 0 remove the main package, drivers, and php extensions 8 2 apt get remove y php8 2 php8 2 8 0 apt get remove y php8 0 php8 0 delete the directory with php nested files 8 2 rm rf /etc/php/8 2 8 0 rm rf /etc/php/8 0 php installation install php with extensions and drivers shell apt install y php8 3 cli php8 3 bcmath php8 3 fpm php8 3 curl php8 3 gd php8 3 intl php8 3 ldap php8 3 mbstring php8 3 mysql php8 3 opcache php8 3 pgsql php8 3 soap php8 3 zip php8 3 sqlite3 php8 3 xml php8 3 dev php pear force php to be enabled for apache2 and switch the alternate version for executables shell update alternatives set php /usr/bin/php8 3 update alternatives set phar /usr/bin/phar8 3 update alternatives set phar phar /usr/bin/phar phar8 3 installing a php mongodb driver install a php mongodb driver pecl install mongodb create configuration files for php mongodb startup and activation echo "extension=mongodb so" | tee /etc/php/8 3/fpm/conf d/20 mongodb ini echo "extension=mongodb so" | tee /etc/php/8 3/cli/conf d/20 mongodb ini changing web server php handler to php fpm make sure the php8 3 fpm service is up and running systemctl status php8 3 fpm start and activate the autorun service if it is stopped systemctl start php8 3 fpm systemctl enable php8 3 fpm edit the virtual host for the server with passwork, which is configured to run over https protocol nano /etc/apache2/sites enabled/default ssl conf modify the php file handler by specifying proxying requests to the php fpm socket shell \<filesmatch \\ php$> sethandler "proxy\ unix /run/php/php8 3 fpm sock|fcgi //localhost/" \</filesmatch> after editing the file, check if the virtual host configuration file matches the example shell \<ifmodule mod ssl c> \<virtualhost 443> servername passwork 443 documentroot /var/www/public \<directory /var/www/public> options followsymlinks allowoverride all require all granted \</directory> sslengine on sslcertificatefile /etc/apache2/ssl/apache crt sslcertificatekeyfile /etc/apache2/ssl/apache key errorlog ${apache log dir}/error log customlog ${apache log dir}/access log combined \<filesmatch \\ php$> sethandler "proxy\ unix /run/php/php8 3 fpm sock|fcgi //localhost/" \</filesmatch> \</virtualhost> \</ifmodule> enable modules and restart services bash a2enmod rewrite proxy fcgi setenvif headers systemctl restart php8 3 fpm systemctl restart apache2 upgrade php to 8 3 docid\ hd5a tumf1dwmddx02z8q passwork update to version 7 docid\ mirirltabi9ksiabc5ih1