How to install BC Math and configure PHP to use BC Math?

Joined
Nov 9, 2013
Messages
47
Best answers
0
Ratings
1
Points
8
#1
I have a PHP script and it is requiring this

BC Math for PHP must be installed on server and PHP must be configured to use BC Math.
I am using Centos 6.x and Apache.

How to install BC Math and how to configure PHP to use BC Math?
 
Joined
Apr 25, 2018
Messages
29
Best answers
0
Ratings
14 3
Points
3
#2
Try yum install php-bcmath. Then restart apache. You can verify that it is installed and loaded by running php -m | grep bcmath.
 
Joined
Nov 9, 2013
Messages
47
Best answers
0
Ratings
1
Points
8
#4
Life Sayings
Thanks, I run the command and it worked.

Code:
[[email protected] ~]# yum install php-bcmath
Loaded plugins: fastestmirror, security
Setting up Install Process
Determining fastest mirrors
epel/metalink                                            | 3.3 kB     00:00
 * epel: fedora.mirror.serversaustralia.com.au
base                                                     | 3.7 kB     00:00
base/primary_db                                          | 4.7 MB     00:03 ...
epel                                                     | 3.2 kB     00:00
epel/primary                                             | 3.2 MB     00:00
epel                                                                                                                   12516/12516
extras                                                                                                      | 3.4 kB     00:00
extras/primary_db                                                                                           |  26 kB     00:00 ...
mysql-connectors-community                                                                                  | 2.5 kB     00:00
mysql-connectors-community/primary_db                                                                       |  26 kB     00:00
mysql-tools-community                                                                                       | 2.5 kB     00:00
mysql-tools-community/primary_db                                                                            |  45 kB     00:00
mysql57-community                                                                                           | 2.5 kB     00:00
mysql57-community/primary_db                                                                                | 152 kB     00:00
updates                                                                                                     | 3.4 kB     00:00
updates/primary_db                                                                                          | 1.8 MB     00:00 ...
Resolving Dependencies
--> Running transaction check
---> Package php-bcmath.x86_64 0:5.3.3-49.el6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-49.el6 for package: php-bcmath-5.3.3-49.el6.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.3-49.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================
 Package                          Arch                         Version                            Repository                  Size
===================================================================================================================================
Installing:
 php-bcmath                       x86_64                       5.3.3-49.el6                       base                        40 k
Installing for dependencies:
 php-common                       x86_64                       5.3.3-49.el6                       base                       530 k

Transaction Summary
===================================================================================================================================
Install       2 Package(s)

Total download size: 569 k
Installed size: 3.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): php-bcmath-5.3.3-49.el6.x86_64.rpm                                                                   |  40 kB     00:00
(2/2): php-common-5.3.3-49.el6.x86_64.rpm                                                                   | 530 kB     00:01 ...
-----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                              286 kB/s | 569 kB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : php-common-5.3.3-49.el6.x86_64                                                                                  1/2
  Installing : php-bcmath-5.3.3-49.el6.x86_64                                                                                  2/2
  Verifying  : php-bcmath-5.3.3-49.el6.x86_64                                                                                  1/2
  Verifying  : php-common-5.3.3-49.el6.x86_64                                                                                  2/2

Installed:
  php-bcmath.x86_64 0:5.3.3-49.el6

Dependency Installed:
  php-common.x86_64 0:5.3.3-49.el6

Complete!
 
Latest Threads
Replies
0
Views
4
Replies
3
Views
7
Replies
1
Views
7

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top