Project

General

Profile

Actions

"Enabling Required PHP Modules "gmp" and "bcmath" for WebAuthn Passwordless Authentication"

You can try, this might fix it...

sudo apt-get install php8.1-gmp php8.1-bcmath
sudo systemctl restart apache2

else ...

The PHP modules "gmp" and/or "bcmath" are not enabled. If you use WebAuthn passwordless authentication, these modules are required.

If you see this error message, it means that you need to enable the "gmp" and/or "bcmath" PHP modules on your server. These modules are required for WebAuthn passwordless authentication to work properly.

To enable the "gmp" module, you can follow these steps:

Open your php.ini file. This file is usually located in /etc/php.ini or /etc/php/#.#/apache2/php.ini.

nano /etc/php/8.1/apache2/php.ini

Uncomment the line extension=gmp by removing the semicolon (;) at the beginning of the line.
Uncomment the line extension=bcmath by removing the semicolon (;) at the beginning of the line.

Note: if extension=bcmath is missing add it

Save and close the file.

Restart your web server.

sudo service apache2 restart

If the line is Missing ad it at the end of the file.


After the restart, check that the changes have been applied by running the following command:

php -m

This will display a list of enabled PHP modules. If "gmp" and/or "bcmath" are not in the list, then there may be an issue with the installation of the modules.

If gmp is not listed in the output of php -m, then it means that the gmp module is not currently enabled in your PHP configuration.

To install the gmp PHP extension on Ubuntu 22.04.2 LTS, you can follow these steps:

Open a terminal window.

Install the gmp library and the PHP gmp extension using the following command:

sudo apt-get install php-gmp

even though you shouldn't have to I have had to reboot service to get this to take effect.

Updated by Gareth Eaton 5 months ago · 8 revisions