In the newest version we have removed the GeoIP City integration. The City database on GeoIP 1.1.0 extension was causing a segmentation fault, which resulted in crashing or outputting an error instead of executing the PHP Code.

This error occurs due to the extension incompatibility with the database(dat) file. If you have an older DotKernel version and version >=1.1.0 of GeoIP you might get this error.

On some operating systems Apache will respond your request with HTTP Status Code 200 (OK) and a web page containing the text below.

Error result:

The server encountered an internal error or
 misconfiguration and was unable to complete
 your request.

The error might not be logged as the error is generated the GeoIP extension and not by your PHP code.

If you don’t want to use GeoIP City and just want to get rid of the error go to

  • DotKernel/admin/System.php (Admin/System model) and comment or remove the lines below
if(geoip_db_avail(GEOIP_CITY_EDITION_REV0))
{
    $info = explode(" ",geoip_database_info(GEOIP_CITY_EDITION_REV0));
    $return['city'] = $info[0].' '.Dot_Kernel::TimeFormat($info[1]);
}
  • library/Dot/GeoIp.php (Dot_GeoIp class) and comment or remove the lines below
if(function_exists('geoip_db_avail') && geoip_db_avail(GEOIP_CITY_EDITION_REV0) 
&& 'unknown' == $country[0])
{
    //if GeoIPCity.dat file exists
    $record = geoip_record_by_name($ip);
    if(!empty($record))
    {
        $countryCode = $record['country_code'];
        $countryName = $record['country_name'];
        $country[0] = $countryCode != false  ? $countryCode : 'unknown';
        $country[1] = $countryName != false  ? $countryName : 'NA';
    }
}

Theese changes were also made in the latest version of DotKernel. You should use this fix only if you don’t intend to use GeoIP City.

We recommend special coding for using GeoIP City and in the GeoIP extension in general.

Note that GeoIP is an obsolete extension, Maxmind recommends using GeoIP2.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>