Mukesh
Mukesh

Reputation: 7788

After migrating the production Magento to dev server "dbModel read resource does not implement Zend_Db_Adapter_Abstract'

I migrated a multistore Magento to the development server.I did the changes for the secure and unsecure url in database.

Now when I am accessing the frontend I am getting following error.

dbModel read resource does not implement Zend_Db_Adapter_Abstract

Trace:
#0 /var/www/vhosts/mymagento/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(134): Varien_Data_Collection_Db->setConnection(false)
#1 /var/www/vhosts/mymagento/app/code/core/Mage/Core/Model/Config.php(1348): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website))
#2 /var/www/vhosts/mymagento/app/code/core/Mage/Core/Model/Config.php(1380): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website))
#3 /var/www/vhosts/mymagento/app/Mage.php(491): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#4 /var/www/vhosts/mymagento/app/code/core/Mage/Core/Model/Abstract.php(208): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#5 /var/www/vhosts/mymagento/app/code/core/Mage/Core/Model/Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection()
#6 /var/www/vhosts/mymagento/app/code/core/Mage/Core/Model/App.php(608): Mage_Core_Model_Abstract->getCollection()
#7 /var/www/vhosts/mymagento/app/code/core/Mage/Core/Model/App.php(466): Mage_Core_Model_App->_initStores()
#8 /var/www/vhosts/mymagento/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Model_App->_initCurrentStore('', 'store')
#9 /var/www/vhosts/mymagento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#10 /var/www/vhosts/mymagento/index.php(87): Mage::run('', 'store')
#11 {main

I tried following to fix this.

1) Cleared all caches from the var/cache folder

2) Deleted all session from var/session folder

3) Given 777 file permission recursively to the entire application

4)Tried this solution also tutorial site link

5)Changed the DB setting in local.xml also

6) I have disabled all local modules also using local.xml

 <disable_local_modules>true</disable_local_modules>

I have tried solutions given on Google. Still the issue is not resolved.

How to fix this.

Upvotes: 0

Views: 3250

Answers (2)

Shahzad Ashrafi
Shahzad Ashrafi

Reputation: 11

yes this is it, I also faced the issue and it took me a while to realize it was Linux Enhanced Security that was not letting CHMOD to work. Running the command "chcon -R -t httpd_sys_rw_content_t /var/www/html/magento/" did the trick.

Upvotes: 1

Mukesh
Mukesh

Reputation: 7788

It was the file permission issue due to some linux security settings.Though I was able to run chmod -R 755 files permission were not getting properly set.

Running the following command fixed the issue.

chcon -Rv --type=httpd_sys_content_t <web Directry>

Upvotes: 1

Related Questions