Torann / laravel-geoip

Determine the geographical location of website visitors based on their IP addresses.
http://lyften.com/projects/laravel-geoip
BSD 2-Clause "Simplified" License
2.09k stars 372 forks source link

Call to undefined function Torann\GeoIP\gzopen() #35

Closed andycaramba closed 7 years ago

andycaramba commented 9 years ago

Hi there. I have this issue on 32-bit Ubuntu 14.04.2 LTS and PHP 5.5.9-1ubuntu4.11 (built: Jul 2 2015 15:17:32) with command php artisan geoip:update

Error Output: PHP Fatal error:  Call to undefined function Torann\GeoIP\gzopen() in vendor/torann/geoip/src/Torann/GeoIP/GeoIPUpdater.php on line 55

When i change gzopen() to gzopen64() it works fine.

cringerjs commented 8 years ago

This is a known issue on Ubuntu 14.04. Please see the bug report at https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1315888

Essentially it has to do whether or not the PHP on your server is compiled with large file support or not.

I suppose we could add a check to GeoIPUpdater to check for the existence of gzopen64() and use that otherwise use gzopen().