1

My version of PHP, 5.3.8, doesn't contain BC-Math, which is needed for many cryptocurrency functions.

Google hasn't been particularly helpful for links on how to install this particularly library, so I'm at a total loss on how to add it to my already running PHP webserver.

Might someone point me in the direction of how to install this?

tim peterson
  • 23,653
  • 59
  • 177
  • 299
  • mac 10.7.5, so linux, right? – tim peterson Feb 23 '14 at 13:36
  • Windows or linux, if linux what distribution? – Ne Ma Feb 23 '14 at 13:36
  • Are you *sure* it doesn't contain BC-Math? After checking the docs, it says, `Since PHP 4.0.4, libbcmath is bundled with PHP. You don't need any external libraries for this extension.` – Tomanow Feb 23 '14 at 13:38
  • yeah I can't run any BC-math functions. I get errors like `Call to undefined function bcdiv()`. You get the same thing if you run `bcscale(8);` here=> http://writecodeonline.com/php/ – tim peterson Feb 23 '14 at 13:45
  • `$ php -m [PHP Modules] apc bz2 Core ctype curl date dom ereg fileinfo filter gd gettext hash iconv json libxml mbstring mcrypt memcache mhash mongo mysql mysqli openssl pcre PDO pdo_mysql pdo_sqlite Phar posix readline Reflection session SimpleXML soap sockets SPL SQLite sqlite3 standard tidy tokenizer xml xmlreader xmlwriter xsl zlib ` – tim peterson Feb 23 '14 at 13:52
  • You need to (re)build PHP and supply the config line --enable-bcmath – Tularis Feb 23 '14 at 13:52
  • I've never built PHP before and a little scared to destroy the version I already have running. Are there some simple commands for this? – tim peterson Feb 23 '14 at 13:56
  • Technically, Mac OS X is based on *BSD, so neither Windows nor GNU/Linux. – Agi Hammerthief Feb 23 '14 at 16:23
  • 1
    Here's a page that might help you to do what @Tularis suggests: http://mac-dev-env.patrickbougie.com/php/ Alternatively, you can install PHP with homebrew. – Agi Hammerthief Feb 23 '14 at 16:26

0 Answers0