Sure, there could be two possibilities...Ok well I have a member whose IP shows as Newark, California but the flag shows as Canadian instead of US. Any ideas?
Countryflags\Db\Reader\InvalidDatabaseException: Error opening database file (/home/dressedw/public_html/data/countryflags/GeoLite2-Country.mmdb). - library/Snog/CountryFlags/Listener/Includes/Reader.php:248
Generated By: Great White Snark, 15 minutes ago
Stack Trace
#0 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Includes/Reader.php(60): Countryflags\Db\Reader->findMetadataStart('/home/dressedw/...')
#1 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Visitor.php(113): Countryflags\Db\Reader->__construct('/home/dressedw/...')
#2 [internal function]: Snog_CountryFlags_Listener_Visitor::visitor(Object(XenForo_Visitor))
#3 /home/dressedw/public_html/library/XenForo/CodeEvent.php(90): call_user_func_array(Array, Array)
#4 /home/dressedw/public_html/library/XenForo/Visitor.php(477): XenForo_CodeEvent::fire('visitor_setup', Array)
#5 /home/dressedw/public_html/library/XenForo/Session.php(274): XenForo_Visitor::setup(694, Array)
#6 /home/dressedw/public_html/library/XenForo/Controller.php(293): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#7 /home/dressedw/public_html/library/XenForo/Controller.php(306): XenForo_Controller->_setupSession('Index')
#8 /home/dressedw/public_html/library/XenForo/FrontController.php(350): XenForo_Controller->preDispatch('Index', 'XenForo_Control...')
#9 /home/dressedw/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/dressedw/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(51) "http://www.dressedwell.net/forums/mens-clothing.17/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
It looks like the GeoLite2-Country.mmdb file is not there for some reason. Try running the 'Update GeoIP Database' cron task to update it and see if there are any errors.@Snog all of a sudden the site crashed and country flags brought everything to a halt. got 5 of this same error:
Code:Countryflags\Db\Reader\InvalidDatabaseException: Error opening database file (/home/dressedw/public_html/data/countryflags/GeoLite2-Country.mmdb). - library/Snog/CountryFlags/Listener/Includes/Reader.php:248 Generated By: Great White Snark, 15 minutes ago Stack Trace #0 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Includes/Reader.php(60): Countryflags\Db\Reader->findMetadataStart('/home/dressedw/...') #1 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Visitor.php(113): Countryflags\Db\Reader->__construct('/home/dressedw/...') #2 [internal function]: Snog_CountryFlags_Listener_Visitor::visitor(Object(XenForo_Visitor)) #3 /home/dressedw/public_html/library/XenForo/CodeEvent.php(90): call_user_func_array(Array, Array) #4 /home/dressedw/public_html/library/XenForo/Visitor.php(477): XenForo_CodeEvent::fire('visitor_setup', Array) #5 /home/dressedw/public_html/library/XenForo/Session.php(274): XenForo_Visitor::setup(694, Array) #6 /home/dressedw/public_html/library/XenForo/Controller.php(293): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http)) #7 /home/dressedw/public_html/library/XenForo/Controller.php(306): XenForo_Controller->_setupSession('Index') #8 /home/dressedw/public_html/library/XenForo/FrontController.php(350): XenForo_Controller->preDispatch('Index', 'XenForo_Control...') #9 /home/dressedw/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch)) #10 /home/dressedw/public_html/index.php(13): XenForo_FrontController->run() #11 {main} Request State array(3) { ["url"] => string(51) "http://www.dressedwell.net/forums/mens-clothing.17/" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
If you have problems with the data folder changing permission, it's not coming from this add-on. And I've never experienced the data folder changing permissions on it's own.chmod data to 0777 again. Seems to do this every once in a while and running chmod again resolves it. I made a cron to do it daily and never an issue since.
The following changes have been made in this update:
- Add - Error logging to server error log during MaxMind database update.
updated the addon, and checked permission on the data folder. ran the cron and the error popped up immediatelyIt looks like the GeoLite2-Country.mmdb file is not there for some reason. Try running the 'Update GeoIP Database' cron task to update it and see if there are any errors.
Countryflags\Db\Reader\InvalidDatabaseException: Error opening database file (/home/dressedw/public_html/data/countryflags/GeoLite2-Country.mmdb). - library/Snog/CountryFlags/Listener/Includes/Reader.php:248
Generated By: viaattovannucci, A moment ago
Stack Trace
#0 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Includes/Reader.php(60): Countryflags\Db\Reader->findMetadataStart('/home/dressedw/...')
#1 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Visitor.php(113): Countryflags\Db\Reader->__construct('/home/dressedw/...')
#2 [internal function]: Snog_CountryFlags_Listener_Visitor::visitor(Object(XenForo_Visitor))
#3 /home/dressedw/public_html/library/XenForo/CodeEvent.php(90): call_user_func_array(Array, Array)
#4 /home/dressedw/public_html/library/XenForo/Visitor.php(477): XenForo_CodeEvent::fire('visitor_setup', Array)
#5 /home/dressedw/public_html/library/XenForo/Session.php(274): XenForo_Visitor::setup(738, Array)
#6 /home/dressedw/public_html/library/XenForo/Controller.php(293): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#7 /home/dressedw/public_html/library/XenForo/Controller.php(306): XenForo_Controller->_setupSession('Index')
#8 /home/dressedw/public_html/library/XenForo/FrontController.php(350): XenForo_Controller->preDispatch('Index', 'LiveUpdate_Cont...')
#9 /home/dressedw/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/dressedw/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(47) "http://www.dressedwell.net/index.php?liveupdate"
["_GET"] => array(1) {
["liveupdate"] => string(0) ""
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(61) "/threads/passaggio-cravatte-the-scandal-continues.814/page-54"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
After you updated the add-on and ran the cron task, are there any other errors in the admin error log?updated the addon, and checked permission on the data folder. ran the cron and the error popped up immediately
Code:Countryflags\Db\Reader\InvalidDatabaseException: Error opening database file (/home/dressedw/public_html/data/countryflags/GeoLite2-Country.mmdb). - library/Snog/CountryFlags/Listener/Includes/Reader.php:248 Generated By: viaattovannucci, A moment ago Stack Trace #0 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Includes/Reader.php(60): Countryflags\Db\Reader->findMetadataStart('/home/dressedw/...') #1 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Visitor.php(113): Countryflags\Db\Reader->__construct('/home/dressedw/...') #2 [internal function]: Snog_CountryFlags_Listener_Visitor::visitor(Object(XenForo_Visitor)) #3 /home/dressedw/public_html/library/XenForo/CodeEvent.php(90): call_user_func_array(Array, Array) #4 /home/dressedw/public_html/library/XenForo/Visitor.php(477): XenForo_CodeEvent::fire('visitor_setup', Array) #5 /home/dressedw/public_html/library/XenForo/Session.php(274): XenForo_Visitor::setup(738, Array) #6 /home/dressedw/public_html/library/XenForo/Controller.php(293): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http)) #7 /home/dressedw/public_html/library/XenForo/Controller.php(306): XenForo_Controller->_setupSession('Index') #8 /home/dressedw/public_html/library/XenForo/FrontController.php(350): XenForo_Controller->preDispatch('Index', 'LiveUpdate_Cont...') #9 /home/dressedw/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch)) #10 /home/dressedw/public_html/index.php(13): XenForo_FrontController->run() #11 {main} Request State array(3) { ["url"] => string(47) "http://www.dressedwell.net/index.php?liveupdate" ["_GET"] => array(1) { ["liveupdate"] => string(0) "" } ["_POST"] => array(4) { ["_xfRequestUri"] => string(61) "/threads/passaggio-cravatte-the-scandal-continues.814/page-54" ["_xfNoRedirect"] => string(1) "1" ["_xfToken"] => string(8) "********" ["_xfResponseType"] => string(4) "json" } }
nopeAfter you updated the add-on and ran the cron task, are there any other errors in the admin error log?
it continuedEDIT: Clear the error log and see if the error continues. The file does exist on your server and is valid. It MAY have been missing or being written to when that user's country was checked and happened while the file was being downloaded/extracted.
Countryflags\Db\Reader\InvalidDatabaseException: Error opening database file (/home/dressedw/public_html/data/countryflags/GeoLite2-Country.mmdb). - library/Snog/CountryFlags/Listener/Includes/Reader.php:248
Generated By: doghouse, Today at 2:23 PM
Stack Trace
#0 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Includes/Reader.php(60): Countryflags\Db\Reader->findMetadataStart('/home/dressedw/...')
#1 /home/dressedw/public_html/library/Snog/CountryFlags/Listener/Visitor.php(113): Countryflags\Db\Reader->__construct('/home/dressedw/...')
#2 [internal function]: Snog_CountryFlags_Listener_Visitor::visitor(Object(XenForo_Visitor))
#3 /home/dressedw/public_html/library/XenForo/CodeEvent.php(90): call_user_func_array(Array, Array)
#4 /home/dressedw/public_html/library/XenForo/Visitor.php(477): XenForo_CodeEvent::fire('visitor_setup', Array)
#5 /home/dressedw/public_html/library/XenForo/Session.php(274): XenForo_Visitor::setup(174, Array)
#6 /home/dressedw/public_html/library/XenForo/Controller.php(293): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#7 /home/dressedw/public_html/library/XenForo/Controller.php(306): XenForo_Controller->_setupSession('Refresh')
#8 /home/dressedw/public_html/library/XenForo/FrontController.php(350): XenForo_Controller->preDispatch('Refresh', 'Siropu_Chat_Con...')
#9 /home/dressedw/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/dressedw/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(49) "http://www.dressedwell.net/index.php?chat/refresh"
["_GET"] => array(1) {
["chat/refresh"] => string(0) ""
}
["_POST"] => array(15) {
["room_id"] => string(1) "0"
["user_rooms"] => array(1) {
[0] => string(5) "22139"
}
["last_id"] => string(5) "22139"
["activity_last_update"] => string(10) "1471285325"
["users_last_update"] => string(10) "1471285354"
["inverse"] => string(1) "0"
["hide_bot"] => string(1) "0"
["no_users"] => string(1) "0"
["show_ignored"] => string(1) "0"
["all_pages"] => string(1) "0"
["loading"] => string(1) "0"
["_xfRequestUri"] => string(8) "/forums/"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
Ok, it's question and answer time then.i have to keep the addon off otherwise i'm not able to load the site and the server CPU jumps to almost 100%.
I don't think that's the case here since looking back through the thread this isn't a new install. The add-on just doesn't stop working all of a sudden on it's own.The old files (before your recent update) might have been cached if he used opcache btw. Just leaving this here, in case you guys miss that part like I always did with whichever add-on (even mine).
Yeah, I reread the error a hundred times and had to edit my reply a couple of times. The error that's coming up isn't that the file doesn't exist, it's an error reading the file. But the file is valid and readable when I grab it from his site and use it on my development server.I'm pretty sure you said that there was a check in the script to check whether the file exists or not. So if it doesn't, it won't log that error. And I kinda assumed that you added the check on your recent update. But after seeing your edit, well, I guess it wasn't opcache then, lmao
This can happen for one of two reasons:I'm getting lots of users in Florida & California showing Canadian flag but their IP's check out as USA. What do I need to do?
We use essential cookies to make this site work, and optional cookies to enhance your experience.