I run several sites on different servers. GeoIP is installed on some servers on the Apache server, so I can find out their location by their IP address. For example, to get the name of my country, I can do this:
$countryName = apache_note("GEOIP_COUNTRY_NAME");
However, on some servers that do not use the GeoIP module, this appears to be causing problems.
It seems that checking that $countryName comesreturns empty testing if apache_note("GEOIP_COUNTRY_NAME")exists with isset()is not enough. It seems like I'm just getting HTML rendering errors without error messages.
So, is there a way to make an expression ifin PHP to check if this GeoIP module exists in Apache?
(Note that on servers where the GeoIP module is not installed, I do not have access to the Apache settings, so installing the module is not an option.)
source
share