Title: Problems with bcmath
Last modified: January 16, 2023

---

# Problems with bcmath

 *  [yaseico](https://wordpress.org/support/users/yaseico/)
 * (@yaseico)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problems-with-bcmath/)
 * 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](https://wordpress.org/support/users/yaseico/)
 * (@yaseico)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problems-with-bcmath/#post-16377087)
 * 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.15Version table:7.4.3-
   4ubuntu2.15 500500 [http://azure.archive.ubuntu.com/ubuntu](http://azure.archive.ubuntu.com/ubuntu)
   focal-updates/universe amd64 Packages500 [http://security.ubuntu.com/ubuntu](http://security.ubuntu.com/ubuntu)
   focal-security/universe amd64 Pack ages7.4.3-4ubuntu1 500500 [http://azure.archive.ubuntu.com/ubuntu](http://azure.archive.ubuntu.com/ubuntu)
   focal/universe amd64 Packages
 *  Plugin Author [IP2Location](https://wordpress.org/support/users/ip2location/)
 * (@ip2location)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problems-with-bcmath/#post-16379344)
 * Hi,
 * Please check your phpinfo(); if bcmath is installed.
 *  Thread Starter [yaseico](https://wordpress.org/support/users/yaseico/)
 * (@yaseico)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problems-with-bcmath/#post-16381231)
 * 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?:
 * > [View post on imgur.com](https://imgur.com/utbE5n4)
 *  Plugin Author [IP2Location](https://wordpress.org/support/users/ip2location/)
 * (@ip2location)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problems-with-bcmath/#post-16383316)
 * Please check your fpm/php.ini if loaded the **bcmath **module:
 * `extension=bcmath.so`
 *  Thread Starter [yaseico](https://wordpress.org/support/users/yaseico/)
 * (@yaseico)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problems-with-bcmath/#post-16384885)
 * 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](https://wordpress.org/support/users/ip2location/)
 * (@ip2location)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/problems-with-bcmath/#post-16388291)
 * 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.

 * ![](https://ps.w.org/ip2location-redirection/assets/icon-128x128.png?rev=2121920)
 * [IP2Location Redirection](https://wordpress.org/plugins/ip2location-redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ip2location-redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ip2location-redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/ip2location-redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ip2location-redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ip2location-redirection/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [IP2Location](https://wordpress.org/support/users/ip2location/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/problems-with-bcmath/#post-16388291)
 * Status: not resolved