Hướng dẫn bcmath php extension install

Skip to content

  • HOME
  • SERVICES

      • PHP Development
      • Laravel Development
      • iPhone App Development
      • Android App Development
      • WooCommerce Development
      • Magento Development
      • Shopify Development
      • WordPress Development
        • WordPress Theme Development
        • WordPress Plugin Development
      • Website Design

  • ABOUT
  • BLOG
  • Request a Quote

Install BCmath Extension in PHP

PHP offers various extensions to deal with different cases. BCMath is one of PHP extension which helps us while working with float values in PHP. In BCMath, BC Stands for Binary Calculator. In this article, we will see how to Install BCMath Extension in PHP on various platforms.

BC Stands for Binary Calculator

Install BCMath Extension in PHP – Windows

The installation of PHP extension in PHP is very simple. Open your active php.ini and look for the line extension=php_bcmath.dll. If that line is commented with ; at the start then you just need to remove that ; and restart apache will load this BCMath extension with PHP.

Install BCMath Extension in PHP – Ubuntu

To install PHP extension in Ubuntu you will need either root or sudo user access. We will see how BCMath extension can be installed on various versions of PHP.

PHP 5.6

sudo apt install php5.6-bcmath

PHP 7.0

sudo apt install php7.0-bcmath

Other PHP Version

sudo apt install php-bcmath

If you are not sure which version of PHP you are using then you can type php -v in your terminal and you will get a version of PHP installed.

If all the above method did not work for you then you can search for all available module which is related to PHP. Type apt-cache search php in your terminal and it will list all PHP modules and extension which are compatible with your PHP version.

Once an extension is installed using any of the above methods then you need to restart the apache server in order to load BCMath extension in PHP.

Install BCMath Extension in PHP – CentOS

Same as Ubuntu you will need root or sudo user access to install an extension in PHP.

PHP 5.6

sudo yum install php56u-bcmath

PHP 7

sudo yum install php7.0-bcmath

If above did not work for you then you can search for an available package for your PHP version using sudo yum search bcmath and it will show available bcmath package for your PHP installation.

After the extension is installed you need to restart apache using sudo service httpd restart and you are done with the installation of PHP BCMath extension.

In the next article, we will see what is the use of this PHP BCMath Extension while working with float values in PHP.

Experienced full stack freelance web developer with a track record of producing excellent results for 11+ years. Excellent communication and collaboration skills, managing with a team of 20+ people. I’m motivated to make a positive impact on your revenue through the customer web portal development project.

Recent Posts

  • Null Coalescing Assignment Operator in PHP 7.4
  • W3Layouts – Best Website Builder
  • Everything You Need to Know Concerning WordPress
  • Caution while working with float values in PHP
  • Install BCmath Extension in PHP
  • Facts about Magento You Should Know
  • Can HTML5 Boost VR Gaming?

Related Posts

FREE QUOTE

Do you need help with services? Request a free quote to get in touch.

Chủ Đề