maxmind / GeoIP2-php

PHP API for GeoIP2 webservice client and database reader
https://maxmind.github.io/GeoIP2-php/
Apache License 2.0
2.33k stars 276 forks source link

Call to undefined function MaxMind\Db\Reader\bcadd() #10

Closed eyp closed 10 years ago

eyp commented 10 years ago

Hi, I'm new to this API, so I've tried the example code that is at home page. First I've had to add "symfony/event-dispatcher": "2.4.0" dependency to composer.json because it isn't able to download 2.4.1 version that is what requires guzzle library.

Then I've put the example code into a test, but I've got this error: Code: $reader = new Reader(dirname(FILE) . '/../../config/GeoLite2-City.mmdb');

Error: Call to undefined function MaxMind\Db\Reader\bcadd() in ...vendor/maxmind-db/reader/src/MaxMind/Db/Reader/Decoder.php on line 25

I've seen that there's another closed issue that supposedly solves the problem, but I still got the same error. Besides, I've tried to add a dependecy:

"ext-bcmath":"*"

But composer is not able to find that dependency, any ideas?

eyp commented 10 years ago

For get it, I didn't know there was a PHP library called bcmath that I could install on the machine.