8
votes

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?

2
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. - mlewis54
I can't accept your answer, as it's only a comment. If you want to put it as an answer I'll accept it. - user1262516

2 Answers

11
votes

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

8
votes

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.