BCMATH PHP Extension is Required; How can i solve this?

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.6
Virtualmin version 7.7

Hi guys, I’ve been trying to solve this problem for several days but I can’t, I’m installing a php script but I can’t solve the installation requirements, I’ve searched in the php.ini and the extension required extension=php_bcmath.dll doesn’t appear, I’ve already installed it on the server but it still tells me that it’s required, with respect to the permissions, I’ve already gone to the section to fix permissions but still this problem continues, does anyone know how to solve it? this problem?, sorry for the bad english, I’m using traduccotr

As to the PHP.

I don’t know the Ubuntu version names but package names usually don’t change from version to version. If you installed via the package manager it should be found. You don’t say how you installed it.

I’m guessing 755 is the default for the directiory. 775 is kinda dangerous unless the script reverts afterwards. I’m guessing you could the file manager to change the permissions but I’m not sure as I’d go command line for that.

1 Like

Hello, ID10 thanks for answering. I installed virtualmin through the quick installation script. I have php versions 7.4 and 8.1. When you review the php.ini, the bcmath extension does not appear, only the following appears that I show in the capture: “bcmath.scale = 0” I have changed that value to 2 but the problem is not resolved. Regarding the permissions, I have tried to change the permissions through the command terminal, through the file manager, and still the same error continues

But how did you install bcmath php? Did you use your package manager?

1 Like

Why are you expecting the php.ini to change on its own? That’s not how it works. Installing an extension does not modify the php.ini. But, it may add config files to /etc/php.d

You should install the appropriate php-bcmath package (from your OS package manager!) for your versions of PHP. Depending on the execution mode you use, you may also need to modify your domain’s PHP configuration to use the file (but probably not, the package usually includes a configuration file in /etc/php.d and most of the time that gets included in the PHP configuration at runtime.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.