Database file does not exist
-
Hi,
I use this super plugin on more the 80 Sites and now I have an error at all domains ??
I did not know how to fix that.
I am not able to majke run the plugin correct. I always see the the text under the “Local Database Settings” Database file does not existI see / have the folders /wp-content/uploads/ip-geo-api with the 2 subfolders ip2location & maxmind) but there are not the needed Database files in it.
I i click on Download database –> download now nothing happens, I also did not receive an error or something.
What can I do?
Kind regards
-
Hello @hai3009,
Sorry about your issue. First of all, I have to ask you if the filesystem of your server uses FTP or SSH based system. If so you may define some constants in wp-config.php. Please refer to WordPress Upgrade Constants.
Basically, this plugin uses WordPress Filesystem API and requires FTP host name, user name and password in wp-config.php.
Regarding to the error message, I intended to display a message when an error occurred like this:
Unable to write /public_html/wp-content/ip-geo-api/maxmind/GeoIP.dat. Please check the permission.
But the fact is different than what I was expecting. So I also have to ask you to replace the current file to the fixed one. Could you test it for me?
- Download https://gist.github.com/tokkonopapa/1948ceb9ff42ef21e9baf2d68b04d16e/archive/a642f7b7faccd2700578c9d53ee991aabee51347.zip and unzip.
- You can find a file
class-ip-geo-block-cron.php
in unzipped folder. - Backup the original file that name is same as above in your server
/wp-content/plugins/ip-geo-block/classes/
. - Upload the unzipped file to the above folder.
wp-content/ ├── plugins │?? ├── ip-geo-block │?? │?? ├── admin │?? │?? ├── classes │?? │?? │?? ├── class-ip-geo-block-cron.php <=== this file │ │ │ ├── ... │ │ │ └── ... │?? │?? ├── database │?? │?? ├── includes │?? │?? ├── index.php │?? │?? ├── ip-geo-block.php │?? │?? ├── languages │?? │?? ├── rewrite.php │?? │?? ├── samples.php │?? │?? ├── uninstall.php │?? │?? └── wp-content
Then when you push the “Download now” button, you can find the error message and we will be able to know what should we do next.
Sorry for the inconvenient, but I’d appreciate your cooperation.
Thanks.Hello tokkonopapa,
thank you for your fast answer!
First I must say I did not know which file System my server uses. I transfer all my files with ftp programm Filezilla, server is reachable under https://So, now I upload the file from you class-ip-geo-block-cron.php and I change the folder permissions to 777 (with 755 I receive permission error).
With the 777 at the folders I was able to download the Maxmind database (IPV4 & IPV6) but on the IP2Location database I receive the error
Unable to read /tmp/IP2LOCATION-LITE-DB1.BIN-z3obxl.tmp. Please check the permission.
Thank you so far for your great help!
Kind regards
Hi @hai3009,
I transfer all my files with ftp programm Filezilla
Do you mean you can’t install or update any plugins or themes from WordPress dashboard so that you use FTP?
And one more question. Does your server share hosting server or dedicated server?
Anyway, I do not recommend 777 for the security reason especially on shared server. Once you have database files in
ip-geo-api/maxmind
andip-geo-api/ip2location
, then you should back their permission 755 and give write permission to the following database files:ip-geo-api/ ├── drop-in-sample.php ├── index.php ├── ip2location │?? ├── IP2LOCATION-LITE-DB1.BIN <== │?? ├── IP2LOCATION-LITE-DB1.IPV6.BIN <== │?? ├── IP2Location.php │?? ├── bcmath.php │?? └── class-ip2location.php └── maxmind ├── GeoIP.dat <== ├── GeoIPASNum.dat <== ├── GeoIPASNumv6.dat <== ├── GeoIPv6.dat <== ├── LICENSE ├── class-maxmind.php ├── geoip.inc └── geoipcity.inc
The permission should be 775 OK. (write permission for user and group, no write permission for others)
As for ip2location databases, I can’t understand why
/tmp
directory could not readable. (Disk full?) But you can download from the link on IPGB settings page by your hand. Follow the IPv4 and download “IPv4 BIN” and “IPv6 BIN” manually, then upload the above folder by FTP.I think once you configure above, you can update DBs automatically.
Good luck!
Hi,
no I can use dashboard, no problem.
I am at a shared hoster all-inkl.com, I have a own managed server.If I change the 2 folders back to 755 than I can’t update the monthly database files, I receive than again the write permission error.
For tmp folder. I did not have any tmp folder at my wordpress installations, I cant see such a folder. I also have no tmp folder defined in the wp-config.php
Im a litle confused
Thank you for you kindly help !
For testing I have created an /tmp folder in root
and /tmp
and /wp-content/tmp
and /wp-content/uploads/tmp
and /wp-content/uploads/ip-geo-api/tmp
and /wp-content/uploads/ip-geo-api/ip2location/tmpI gave all folders 777, nothing has changed, evertime same error
Unable to read /tmp/IP2LOCATION-LITE-DB1.IPV6_.BIN-QEkhfm.tmp. Please check the permission.
Kind regards
-
This reply was modified 7 years, 7 months ago by
hai3009.
Update:
Now I have a folder /tmp in root with 777 and there are 4 files in it
IP2LOCATION-LITE-DB1.BIN
IP2LOCATION-LITE-DB1.IPV6.BIN
LICENSE-CC-BY-SA-4.0.TXT
README_LITE.TXTBut I still receive the same error
Unable to read /tmp/IP2LOCATION-LITE-DB1.IPV6_.BIN-QEkhfm.tmp. Please check the permission.
Hi @hai3009,
- You have to set 777
/wp-content/uploads/
folder according to WordPress – Version 4.6.1: Installation. I’m not sure that sub folder should also be 777 or not. - Normally, WordPress setup its temporal folder as system temporal folder (e.g.
/tmp
) and it is usually assigned as 777. We can know the place via get_temp_dir(). - Then IPGB unzip downloaded file in temporal folder using unzip_file().
- “Now I have a folder /tmp in root with 777 and there are 4 files in it
IP2LOCATION-LITE-DB1.BIN
IP2LOCATION-LITE-DB1.IPV6.BIN
LICENSE-CC-BY-SA-4.0.TXT
README_LITE.TXT” means that you already succeed upzip_file(). /tmp/IP2LOCATION-LITE-DB1.IPV6_.BIN-QEkhfm.tmp
is before unzipped file. So it does not make any sense.
I think you issue might be cause by the permission setting on your server. Please find the document on all-inkl.com or ask support.
Good luck!
-
This reply was modified 7 years, 7 months ago by
tokkonopapa.
Hi,
I’m very sorry but I found one more bug. You saw the message:
Unable to read /tmp/IP2LOCATION-LITE-DB1.IPV6_.BIN-QEkhfm.tmp. Please check the permission.
But it should be:
Unable to read /tmp/IP2LOCATION-LITE-DB1.IPV6.BIN. Please check the permission.
So I’m very curious that you already found:
Now I have a folder /tmp in root with 777 and there are 4 files in it
IP2LOCATION-LITE-DB1.BIN
IP2LOCATION-LITE-DB1.IPV6.BIN
LICENSE-CC-BY-SA-4.0.TXT
README_LITE.TXTAnyway, please setup the permission properly according to the recommendation by all-inkl.com at first and try again.
P.S. I updated the fixed version at https://gist.github.com/tokkonopapa/1948ceb9ff42ef21e9baf2d68b04d16e/archive/504960cf8c8c5d2b751422df74ca0ee2a4842678.zip
Could you update class-ip-geo-block-cron.php in it?Thanks.
-
This reply was modified 7 years, 7 months ago by
tokkonopapa.
Hi @hai3009,
How are things going? I’m afraid your issue is still there. If so, I’d like to help to solve it.
Thanks.
Hi,
thank you for you kind question, this makes me happy!But sorry, I went crazy ??
Today I want to test the one of my other WordPress installations.
At all my blogs I was made updates with InfiniteWP before.
I picked up one blog and there it is as follows.On the Plugin Page from ip-geo-block I saw on top the error message:
IP Geo Block: Can not find geolocation API libraries in wp-content. It seems to have failed downloading ZIP file from WordPress-IP-Geo-API. Please install ip-geo-api with write permission according to this instruction.
Now I was inspect the folders at this blog.
Following folders I have in in folder /wp-cotnent:
/plugins/ip-geo-block/wp-content/ (755)
/plugins/ip-geo-block/wp-content/ip-geo-api (755)
/plugins/ip-geo-block/wp-content/mu-plugins (755)I change the folder rights on this 3 folders to 777 deactivate and activate plugin tan i go again to plugin page and I still have the same error.
Than I see that I have these folders and folder structure twice.
In /wp-content/uploads there is also an ip-geo-api folderwp-content/uploads/ip-geo-api (755)
wp-content/uploads/ip-geo-api/ip2location (755)
wp-content/uploads/ip-geo-api/maxmind (755)I tryed to change the right to 777 but it was not allowed because I’m not the owner. Owner is “33 33”
Than I was logged in into my server accont and i change user, now I’m able to set the folder permissoins from 755 to 777. Than I was hit save changes in plugin but also nothing happens, still the error message on top.I really did not know what to do. Maybe I must on all my blogs delete the plugin with all settings and upload all again I think, or should there be a other solution?
KInd regards
-
This reply was modified 7 years, 6 months ago by
hai3009.
Dear @hai3009,
I’m deeply sorry about your trouble. But I’d like ask you to send me your email to tokkonopapa at yahoo dot com. I’ll do my best with all my body and soul in order to solve your issue.
All the best,
tokkonopapa
- The topic ‘Database file does not exist’ is closed to new replies.