Skip to main content
Version: 7.0

RPM

Preparation for update

info

If Passwork runs in a cloud or virtual environment, create a snapshot so you can roll back if the PHP upgrade fails.

Elevate to root and refresh the local package index:

sudo -i
dnf update

Removing PHP

Remove the main package along with its drivers and extensions:

dnf remove php php-* -y

Delete the directory that stores PHP extension configuration files:

rm -rf /etc/php.d

Installing PHP

Install PHP with the required extensions:

dnf install -y php-cli php-fpm php-curl php-devel php-pear php-gd php-intl php-ldap php-bcmath php-mbstring php-mysqlnd php-opcache php-pgsql php-soap php-zip php-sqlite3 php-xml

Increase the memory available for PHP scripts:

sed -i 's/^memory_limit\s*=.*/memory_limit = 256M/' /etc/php.ini
warning

Increase memory_limit to 512M or higher if Passwork will serve a large number of users.

Confirm that the php-fpm service is running:

systemctl status php-fpm

Start the service and enable auto-start if it is stopped:

systemctl start php-fpm
systemctl enable php-fpm

Installing the PHP MongoDB driver

Install the PHP MongoDB driver:

pecl install -f mongodb
danger

Press Enter to accept the default build options.

Create a configuration file to load and enable the MongoDB extension:

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

Restart services to apply the changes:

systemctl restart php-fpm.service
systemctl restart httpd.service