|
@@ 304-307 (lines=4) @@
|
| 301 |
|
$this->test_return(\core\common\Entity::L_REMARK, "PHP extension <strong>GeoIP</strong> (legacy) is installed and working. See utils/GeoIP-update.sh in the CAT distribution and use it tu update the GeoIP database regularly. We stronly advise to replace the legacy GeoIP with GeoIP2 from <a href='https://github.com/maxmind/GeoIP2-php'>here</a>."); |
| 302 |
|
break; |
| 303 |
|
case 2: |
| 304 |
|
if (!is_file(CONFIG['GEOIP']['geoip2-path-to-autoloader'])) { |
| 305 |
|
$this->test_return(\core\common\Entity::L_ERROR, "PHP extension <strong>GeoIP2</strong> not found! Get it from <a href='https://github.com/maxmind/GeoIP2-php'>here</a>."); |
| 306 |
|
return; |
| 307 |
|
} |
| 308 |
|
if (!is_file(CONFIG['GEOIP']['geoip2-path-to-db'])) { |
| 309 |
|
$this->test_return(\core\common\Entity::L_ERROR, "<strong>GeoIP2 database</strong> not found! See utils/GeoIP-update.sh in the CAT distribution and use it tu update the GeoIP database regularly."); |
| 310 |
|
return; |
|
@@ 308-311 (lines=4) @@
|
| 305 |
|
$this->test_return(\core\common\Entity::L_ERROR, "PHP extension <strong>GeoIP2</strong> not found! Get it from <a href='https://github.com/maxmind/GeoIP2-php'>here</a>."); |
| 306 |
|
return; |
| 307 |
|
} |
| 308 |
|
if (!is_file(CONFIG['GEOIP']['geoip2-path-to-db'])) { |
| 309 |
|
$this->test_return(\core\common\Entity::L_ERROR, "<strong>GeoIP2 database</strong> not found! See utils/GeoIP-update.sh in the CAT distribution and use it tu update the GeoIP database regularly."); |
| 310 |
|
return; |
| 311 |
|
} |
| 312 |
|
require_once CONFIG['GEOIP']['geoip2-path-to-autoloader']; |
| 313 |
|
$reader = new Reader(CONFIG['GEOIP']['geoip2-path-to-db']); |
| 314 |
|
try { |