• Hi,

    sorry but I receive error on some blogs, I had same error last year.

    IP2Location.class.php: Unable to open file "/www/htdocs/xxx/cm/wp-content/uploads/ip-geo-api/ip2location/IP2LOCATION-LITE-DB1.BIN"

    If I try to download manually I get the error “mkdir_failed_ziparchive”.

    Folder exists /wp-content/uploads/ip-geo-api/ip2location and has 777 permissions

    Dont know why this is.

    Kind regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author tokkonopapa

    (@tokkonopapa)

    Hello again hai3009,

    First of all, I appreciate your contributions to improve this plugin!

    And sorry about this issue for long time. This error comes from _unzip_file_ziparchive(). But this function does not seem to be the direct cause.

    elseif ( 'zip' === $args && class_exists( 'ZipArchive' ) ) {
        // https://codex.www.ads-software.com/Function_Reference/unzip_file
        WP_Filesystem();
        $tmp = get_temp_dir();
        $ret = unzip_file( $src, $tmp ); // ← Your issue happens here!
    
        if ( is_wp_error( $ret ) )
            throw new Exception(
                $ret->get_error_code() . ' ' . $ret->get_error_message()
            ); // ← Error message is returned here!
        ...
    }

    This code means that downloaded file would be unzipped into the temporary directory which is from get_temp_dir().

    So could you check if WP_TEMP_DIR is defined in your wp-config.php and its permission?

    If this is OK, I should provide you a debug version to identify the issue.

    Thanks.

    I kind of have the same issue. Although not on a Windows Server.

    In Validation rule settings it says:
    IP2Location : IP2Location.class.php: Unable to open file "/home/.sites/7/[removed]/web/[removed]/wp-content/ip-geo-api/ip2location/IP2LOCATION-LITE-DB1.BIN".

    In Local database settings it says:
    IP2Location database (IPv4) – 403 Forbidden
    IP2Location database (IPv6) – 403 Forbidden

    Could not download the zip the other (kind of similar) thread to perform tests. wp-config is correct.

    Thanks and best,
    Simon

    • This reply was modified 7 years, 8 months ago by superficial.
    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi Simon,

    In Local database settings it says:
    IP2Location database (IPv4) – 403 Forbidden
    IP2Location database (IPv6) – 403 Forbidden

    Good information! Download request might be refused by the IP2Location server. Please try to download them manually from the like on “Attribution” tab.

    And I should notice to my users to add attribution link to their sites!

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hello guys,

    It’s quite difficult for me to make it better compatibility between different platforms, but I had added a fallback process when this type of error happens.

    And also add links to zip and gz files in order to make manual downloading easy.

    I appreciate you to follow the steps for checking:

    1. Deactivate this plugin.
    2. Download the beta version 3.0.2b from https://github.com/tokkonopapa/WordPress-IP-Geo-Block/archive/3.0.2.zip
    3. Unzip and upload “ip-geo-block” to your “/wp-content/plugins/”. Overwriting should be OK.
    4. Activate this plugin again.

    Thanks for your cooperation to improve this plugin!

    P.S. Related issue: https://www.ads-software.com/support/topic/deactivated-after-updte-why/

    • This reply was modified 7 years, 8 months ago by tokkonopapa.
    Thread Starter hai3009

    (@hai3009)

    Hi tokkonopapa,

    i have checked, i did not have a temp dir in wp-config, i have much blogs and at all it did not have this. I install all my WP Blogs manually and on all of them never will be created this or such a /tmp directory.

    If I set up manually in wp-config the “define TMP” nothing happens, I tryed to setup a new function in the functions.php of my theme but than I receive an other error…

    I have installed the new version, where can I find the links for manually download the file? I have not found it, sorry.

    Kin regards

    • This reply was modified 7 years, 8 months ago by hai3009.
    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @hai3009,

    Sorry but it’s too difficult to find the download link :-P. Here is the answer:

    Local Database Settings

    Please make sure to deactivate and activate again.

    Regarding to the TMP directory, I made you a bit confused. You don’t have to take the trouble to define TMP directory. WP set the proper directory.

    In the beta version 3.0.2b, I add a fallback process same as in this topic https://www.ads-software.com/support/topic/deactivated-after-updte-why/ because the process of unzip had changed since other issue.

    Any of your feedback would be appreciated.
    Thanks.

    • This reply was modified 7 years, 8 months ago by tokkonopapa.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cant install IP2LOCATION-LITE-DB1.BIN’ is closed to new replies.