Ina Code Blog

bunch of code in one place
« Magento speed problem
Magento: how to change image resolution? »


Feb
27

Magetno problem: dbModel read resource does not implement Zend_Db_Adapter_Abstract

Posted by admin in Magento

I recived CSRF Attack Prevention message from Magento team saying that Magento admin has an vulnerability if attacker knows the admin path. Probably like most people I also used /admin/ to access the Magento administration. The message adviced to change it to something specific, so I did. And the page just crashed!?!

I got the error:

dbModel read resource does not implement Zend_Db_Adapter_Abstract
Trace:
#0 /home/chasi/public_html/trgovina/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php(68): Varien_Data_Collection_Db->setConnection(false)
#1 /home/chasi/public_html/trgovina/app/code/core/Mage/Core/Model/Config.php(789): cialis generic vs brand Mage_Core_Model_Mysql4_Collection_Abstract->__construct(Object(Mage_Core_Model_Mysql4_Website))
#2 /home/chasi/public_html/trgovina/app/code/core/Mage/Core/Model/Config.php(831): Mage_Core_Model_Config->getModelInstance(’core_mysql4/web…’, Object(Mage_Core_Model_Mysql4_Website))
#3 /home/chasi/public_html/trgovina/app/Mage.php(345): Mage_Core_Model_Config->getResourceModelInstance(’core/website_co…’, Object(Mage_Core_Model_Mysql4_Website))
#4 /home/chasi/public_html/trgovina/app/code/core/Mage/Core/Model/Abstract.php(200): Mage::getResourceModel(’core/website_co…’, Object(Mage_Core_Model_Mysql4_Website))
#5 /home/chasi/public_html/trgovina/app/code/core/Mage/Core/Model/Abstract.php(205): Mage_Core_Model_Abstract->getResourceCollection()
#6 /home/chasi/public_html/trgovina/app/code/core/Mage/Core/Model/App.php(384): Mage_Core_Model_Abstract->getCollection()
#7 /home/chasi/public_html/trgovina/app/code/core/Mage/Core/Model/App.php(247): drugs without prescription Mage_Core_Model_App->_initStores()
#8 /home/chasi/public_html/trgovina/app/Mage.php(432): Mage_Core_Model_App->init(”, ’store’, Array)
#9 /home/chasi/public_html/trgovina/app/Mage.php(453): Mage::app(”, ’store’, Array)
#10 /home/chasi/public_html/trgovina/index.php(52): Mage::run()
#11 {main}

I searched and searcher the forums and Magento pages and got some ideas on what may solve the problem. I had to contact my server provider and ask them to delete all cache (/var/cache/) and session (/var/session/) files. I couldn’t do it myself as my permission wasn’t sufficient. If that still doesn’t solve the problem ask them to restart the Apache aswell. That worked for me and the Magento shop is back and runing :)

The other solution would be to reinstall Magento. Hmmmm…

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

One Response to “Magetno problem: dbModel read resource does not implement Zend_Db_Adapter_Abstract”

  1. Added by Mirelon on Mar at 18

    I got the same message, but neither of the solutions work.
    When i am connecting to database on localhost, everything is fine. But when i am connecting to remote database, this message appears. What can cause it?

Leave a Reply

Comment