Ina Code Blog

bunch of code in one place
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]

Feb
24

Magento speed problem

Posted by admin in Magento

Modifying, I mean uncommenting few lines in your .htaccess file can speed up your magento site a looooot. Find these lines below and just remove # before them.

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some online cialis more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch Buy Generic Drugs Without Prescription \bMSIE !no-gzip !gzip-only-text/html
# Don’t compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary

# enable resulting html compression
php_flag zlib.output_compression on

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