I need to enable BC Math, but I don't want to do it using --enable-bcmath, primarily because I don't understand that route.
Is there a way to do this using php.ini only?
I need to enable BC Math, but I don't want to do it using --enable-bcmath, primarily because I don't understand that route.
Is there a way to do this using php.ini only?
To the best of my knowledge you must compile php with the --enable-bcmath option. Without it, the required code won't exist in the binary. Therefore, there is nothing that you can set in php.ini
apt-get install php5-bcmath
–
Nye Unable to locate package php5-bcmath
. Does it have a different name now? –
Trite bcmath
is included as part of the php5
source package and all php5
binary packages in Ubuntu and Debian (since php 5.3.10 at least) have bcmath
included by default, so you do not need to install any additional packages to get it. I can show evidence (for Ubuntu at least) that supports this statement. –
Tabes php-bcmath
installs latest - but be aware - you only want that if you also want to have latest php - if your project runs e.g. on php 5.4 , install php5 packages ;) Sidenote: on Ubuntu 18.04 I had to install this package manually (for php 7.2.1) –
Sweeny sudo apt install php7.X-bcmath
resolved a problem –
Ectoparasite Before recompiling, check the php.ini file and search for "bcmath". You may find bcmath.scale=0. If so, change the 0 to a 2.
© 2022 - 2024 — McMap. All rights reserved.