|
@@ 366-369 (lines=4) @@
|
| 363 |
|
$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>."); |
| 364 |
|
break; |
| 365 |
|
case 2: |
| 366 |
|
if (!is_file(CONFIG['GEOIP']['geoip2-path-to-autoloader'])) { |
| 367 |
|
$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>."); |
| 368 |
|
return; |
| 369 |
|
} |
| 370 |
|
if (!is_file(CONFIG['GEOIP']['geoip2-path-to-db'])) { |
| 371 |
|
$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."); |
| 372 |
|
return; |
|
@@ 370-373 (lines=4) @@
|
| 367 |
|
$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>."); |
| 368 |
|
return; |
| 369 |
|
} |
| 370 |
|
if (!is_file(CONFIG['GEOIP']['geoip2-path-to-db'])) { |
| 371 |
|
$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."); |
| 372 |
|
return; |
| 373 |
|
} |
| 374 |
|
require_once CONFIG['GEOIP']['geoip2-path-to-autoloader']; |
| 375 |
|
$reader = new Reader(CONFIG['GEOIP']['geoip2-path-to-db']); |
| 376 |
|
try { |