• Resolved sicilybambolina

    (@sicilybambolina)


    After installing the plugin, the “IP2LOCATION-LITE-DB1.BIN” and “IP2LOCATION-LITE-DB1.IPV6.BIN” would not download automatically so that my country code could not be scanned.

    So, I copied the bin-files from another project and then uploaded them manually to this new project. My country code was then correctly recognized.

    Will this still cause a problem down the road?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Darko G.

    (@darkog)

    Hey @sicilybambolina,

    It shouldn’t be an issue if you manually added the database.

    If you go to “Download database” section in settings, and click “Download”, what happens?

    Best regards,
    Darko

    Thread Starter sicilybambolina

    (@sicilybambolina)

    It says: “copy_failed_ziparchive Could not copy file.”

    Also: “GeoLite2 not configured. Key is missing.”
    This I can’t copy from the other project because it’s no longer there. Does this no longer work at all?

    Plugin Author Darko G.

    (@darkog)

    @sicilybambolina, it looks like specific environments are affected only including yours. If possible can you please send us a diagnostic information so we can try to identify the issue and hopefully fix it.

    You can find it just above “Save settings” button. Feel free to mask any sensitive information you don’t want to share.

    Email the report on [email protected].

    Best Regards,
    Darko

    Thread Starter sicilybambolina

    (@sicilybambolina)

    Just sent you the diagnostic information.

    Thanks for your quick responses, by the way. ??

    Plugin Author Darko G.

    (@darkog)

    Hey @sicilybambolina, I checked and the environment appears to be fine, i couldn’t reproduce the issue on my end.

    Two things:

    1. Can you please make sure that the server has enough disk space left?
    2. Alternatively, you can switch the temporary directory that the plugin uses to download and extract the databases from system’s (OS) /tmp directory to directory that is within the WordPress filesystem in /wp-content/uploads. Some sites may not be allowed to access /tmp on and hence the errors.
    add_filter('ip-location-block-temp-dir', function($dir, $subdir){
    	$ds = DIRECTORY_SEPARATOR;
    	$uploads = wp_upload_dir();
    	$tmpdir  = trailingslashit( $uploads['basedir'] ) . 'ip-location-block' . $ds . 'tmp' . $ds;
    	if ( ! file_exists( $tmpdir ) ) {
    		wp_mkdir_p( $tmpdir );
    	}
    	return $tmpdir;
    }, 10, 2);

    The above code can be added in functions.php.

    Let me know once you try those.

    Best Regards,
    Darko

    Thread Starter sicilybambolina

    (@sicilybambolina)

    You’re referring to the theme file “functions.php” if I get you correctly?

    I will try this if the auto upload scheduled for tomorrow fails.

    That would then mean that I’d have to add above code snippet over again after each theme update, right?

    Plugin Author Darko G.

    (@darkog)

    If you are not using child theme then yes or the other alternative is to put the snippet in wp-content/mu-plugins file, name the file as you want and make sure it has PHP opening tag (<?php).

    Alternatively, you can just use the APIs instead of database based checking.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘IP2LOCATION-LITE-DB1.BIN’ is closed to new replies.