Hi Greg,
The file name was generated by download_url() which is a utility function in WordPress. So I think this issue might not be caused by slash/back-slash problem.
The point where this issue happened is to open temporary file with ZipArchive and actually the reason of the error may not be “permission” but one of these.
So I should change something to know the exact reason of this error.
For the time being, you can rename the directory ip2location to ip2location- in wp-content/ip-geo-api or wp-content/uploads/ip-geo-api in order not to download the data files.
And I keep this topic open until I find the solution.
Thank you for your reporting this issue!
Ok Tokkonopapa – thanks for that information. A question. If I manually download the files – unzip them – and put them in the ip-geo-api\ip2location folder – will that make them functional – but just a manual process until you come up with the fix?
Let me know, and thanks!
Greg
Unfortunately, just downloading doesn’t work correctly. You need to edit your mySQL database manually. I think it’s danger.
Ok, let’s get more straight forward.
I made a test version which shows ZipArchive error code instead of showing just “check permission”. I hope you can use FTP or cPanel file manager. Could you try the followings?
1. Download zip file from https://github.com/tokkonopapa/WordPress-IP-Geo-Block/archive/2.2.4.1-greg.zip
2. After unzip it, find the file ip-geo-block/classes/class-ip-geo-block-util.php
3. Upload it to your wp-content/plugins/ip-geo-block/classes/
This doesn’t solve the issue but we can get the reason why this issue happned.
I would appreciate your cooperation.
Thanks!
Good Morning Tokkonopapa,
I did as you requested. This is the errors I am getting now…..
ZipArchive error: 11 for C:\Windows\TEMP/IP2LOCATION-LITE-DB1.BIN-wWOPmk.tmp.
and
ZipArchive error: 11 for C:\Windows\TEMP/IP2LOCATION-LITE-DB1.IPV6_.BIN-7833hb.tmp.
Let me know what you want me to do next.
Thanks!
Greg
Good evening Greg,
My time is almost midnight 🙂
Thank you for your testing. The error 11 means “Can’t open file”. Well, I think you’re right!
Since I am running Windows – could the problem be that the slash is incorrect after the TEMP folder – should the “/” be a “\” instead?
So I update the file to replace “/” to “\” like follows:
if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' )
$path = str_replace( '/', '\\', $path );
Sorry to keep bothering you, but could you try the previous 1. 2. and 3. again?
If the same error happens, I’ll provide something as you can handle the zip file by manual process.
Thanks for your kind cooperation.
Hello Tokkonopapa,
Well, after downloading the zip and installing the file – the slashes are correct – but I am still getting the errors below…..
ZipArchive error: (C:\Windows\TEMP\IP2LOCATION-LITE-DB1.BIN-hspLYz.tmp).
and
ZipArchive error: (C:\Windows\TEMP\IP2LOCATION-LITE-DB1.IPV6_.BIN-dz8jtn.tmp).
Is there anything else you would ike for me to try? Let me know, and thanks!
Greg
Hi Greg,
I found another WordPress utility function unzip_file() which might be used in core. I updated the file 2.2.4.1-greg.zip which works fine in my MAMP environment.
Please try it again.
Thanks!
Hello Tokkonopapa,
I made the change of the util file – and the databases download with no problem now!
WOO HOO!
A question for you. Will this fix be in the future releases of the plugin – or do I need to do something when there is a new release?
Thank you for your help on this problem. I really do appreciate it.
Greg
Dear Greg,
Thanks for your good feedback. I’m happy now!
You need nothing to do but wait until I release the next version and just update it.
I really appreciate your great contribution to improve this plugin!