• Resolved lucytech

    (@lucytech)


    I’m seeing this error all the time in the error log file:

    How do i fix it?

    PHP Fatal error: Uncaught GeoIp2\Exception\AddressNotFoundException: The address 127.0.0.1 is not in the database. in /home/customer/www/-/public_html/wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Database/Reader.php:253
    Stack trace: 0 /home/customer/www/-/public_html/wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Database/Reader.php(221): GeoIp2\Database\Reader->getRecord(‘City’, ‘City’, ‘127.0.0.1’) 1 /home/customer/www/-/public_html/wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Database/Reader.php(84): GeoIp2\Database\Reader->modelFor(‘City’, ‘City’, ‘127.0.0.1’) 2 /home/customer/www/-/public_html/wp-content/plugins/shamor/wp-shamor.php(57): GeoIp2\Database\Reader->city(‘127.0.0.1’) 3 /home/customer/www/-/public_html/wp-content/plugins/shamor/wp-shamor.php(66): Shamor->get_location_data_from_ip() 4 /home/customer/www/-/public_html/wp-content/plugins/shamor/wp-shamor.php(177): Shamor->get_shabbat_times() 5 /home/customer/www/-/public_html/wp-includes/class-wp-hook.php(324): Shamor->move_out_of_site(‘/home/customer/…’) 6 /home/customer/www/-/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘/home/customer/…’, Array) 7 /home/customer/www/-/public_html/wp-includes/template-loader.php(104): apply_filters(‘template_includ…’, ‘/home/customer/…’) 8 /home/customer/www/-/public_html/wp-blog-header.php(19): require_once(‘/home/customer/…’) 9 /home/customer/www/-/public_html/index.php(17): require(‘/home/customer/…’) 10 {main}

    thrown in /home/customer/www/-/public_html/wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Database/Reader.php on line 253

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author hatul

    (@hatul)

    Thanks for the report.

    This error happens because the IP address 127.0.0.1 (localhost) is not included in the GeoIP database. It’s a loopback address used internally by the server, and it’s not associated with any geographic location — so the GeoIP library throws an exception.

    In a live site, users access the site with real public IP addresses, so this error shouldn’t occur under normal circumstances.
    If you’re seeing it, it’s likely because the site is being accessed locally (e.g. during development or testing).

    Hope that helps.

    • This reply was modified 10 months ago by hatul.
    Thread Starter lucytech

    (@lucytech)

    I’ve got 100s of them from the past month.

    What can I do to fix it?

    I’m also seeing this error:

    [06-Aug-2025 21:36:24 UTC] PHP Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone () in /home/customer/www/-/public_html/wp-content/plugins/shamor/wp-shamor.php:72
    Stack trace: 0 /home/customer/www/-/public_html/wp-content/plugins/shamor/wp-shamor.php(72): DateTimeZone->__construct(”) 1 /home/customer/www/-/public_html/wp-content/plugins/shamor/wp-shamor.php(177): Shamor->get_shabbat_times() 2 /home/customer/www/-/public_html/wp-includes/class-wp-hook.php(324): Shamor->move_out_of_site(‘/home/customer/…’) 3 /home/customer/www/-/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘/home/customer/…’, Array) 4 /home/customer/www/-/public_html/wp-includes/template-loader.php(104): apply_filters(‘template_includ…’, ‘/home/customer/…’) 5 /home/customer/www/-/public_html/wp-blog-header.php(19): require_once(‘/home/customer/…’) 6 /home/customer/www/-/public_html/index.php(17): require(‘/home/customer/…’) 7 {main}

    Also – how do I know the plugin is working? Obviously I can’t test on Shabbat.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘error in PHP error log’ is closed to new replies.