maxmind / GeoIP2-php

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

Change Phar Stub to allow different path #179

Closed EduRuizDK closed 2 years ago

EduRuizDK commented 2 years ago

Please change Phar Stub to allow loading from different path:

Current stub (only works if geoip2.phar and script are in the same directory): <?php require_once 'phar://geoip2.phar/vendor/autoload.php'; __HALT_COMPILER(); ?>

Change to: <?php require_once 'phar://' . __FILE__ . '/vendor/autoload.php'; __HALT_COMPILER(); ?>

oschwald commented 2 years ago

Thanks for the report! 2.12.2 has been released with this fix.