Enable BCMath using php.ini?

38,956

Solution 1

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

Solution 2

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.

Share:
38,956

Related videos on Youtube

Admin
Author by

Admin

Updated on July 23, 2022

Comments

  • Admin
    Admin 2 months

    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?

    • mlewis54
      mlewis54 over 9 years
      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.
  • Yousha Aleayoub
    Yousha Aleayoub over 4 years
    "Number of decimal digits for all bcmath functions.", its not about enabling the extension
  • Norman Edance
    Norman Edance over 4 years
    And restart your httpd server.

Related