• Hi, I am testing the use of a couple of IP2 plugins including this one. I get a message saying the PHP extension needs to be enabled in the php.ini file. I checked the extension is installed but I am not sure what needs to be in the php.ini file in order to enable it. On tried a different server and there was nothing to do as it worked fine.

    I am using ubuntu 20.04 and PHP 7.4 on both servers. To confirm the module is installed I check the following command:

    apt-cache search php7.4 | grep php7.4

    Which returns: php7.4-bcmath – Bcmath module for PHP

    PHP7.4-fpm status show it is is running, but when I try the command

    php7.4 -m

    Then bcpmath is not listed

    If I try to install the bcmath extension with

    sudo apt-get install php7.4-bcmath

    then I get an error

    The following packages have unmet dependencies:
    php7.4-bcmath : Depends: php7.4-common (= 7.4.3-4ubuntu2.15) but 1:7.4.30-3+ubuntu18.04.1+deb.sury.org+1 is to be installed

    I am not sure what this means. Could you please point me in the right direction / provide the lines of code that need to be in the PHP.ini file?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter yaseico

    (@yaseico)

    On further investigation I see that the output from command

    apt policy php7.4-bcmath

    as indicated below is that bcmath is not installed, which makes sense now but not sure how to fix!

    php7.4-bcmath:
    Installed: (none)
    Candidate: 7.4.3-4ubuntu2.15
    Version table:
    7.4.3-4ubuntu2.15 500
    500 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
    500 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Pack ages
    7.4.3-4ubuntu1 500
    500 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

    Plugin Author IP2Location

    (@ip2location)

    Hi,

    Please check your phpinfo(); if bcmath is installed.

    Thread Starter yaseico

    (@yaseico)

    Hi thanks for getting back to me. The PHP info shows the following, showing that bcmath ins installed but looks like not enabled. I am not sure how to enable it?:

    Plugin Author IP2Location

    (@ip2location)

    Please check your fpm/php.ini if loaded the bcmath module:

    extension=bcmath.so

    Thread Starter yaseico

    (@yaseico)

    Hi I checked the fpm/php.ini file and there is no bcmath extension line in the file. I presume these are automatically inserted when the installation of the the php extension is completed so inserting manually may cause an error?

    Thanks

    Plugin Author IP2Location

    (@ip2location)

    Please check your PHP conf.d folder as well if the settings is not there, please add in and restart your PHP FPM.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Problems with bcmath’ is closed to new replies.