I have just moved a Magento install from one server to another and now when I try to access the frontend I get the "Exception printing is disabled by default for security reasons" error.

I have already tried the following, but none work:

  1. Added reference to tmp folder magento_directory/lib/Zend/Cache/Backend/File.php and also created the folder in the root directory.

  2. Delete everything is cache and session folders.

The output from the error report is below:

Fatal error: Uncaught Error: Class name must be a valid object or a string in /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource.php:225 
Stack trace: 
#0 /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource.php(188): Mage_Core_Model_Resource->getConnectionTypeInstance('{{db_type}}') 
#1 /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('{{db_type}}', Array) 
#2 /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(141): Mage_Core_Model_Resource->getConnection('core_setup') 
#3 /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(234): Mage_Core_Model_Resource_Setup->__construct('core_setup') 
#4 /home/samplesite/public_html/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates() 
#5 /home/samplesite/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules() 
#6 /home/samplesite/public_html/app/Mage.php(683): Mage_Core_Model_App in /home/samplesite/public_html/app/code/core/Mage/Core/Model/Resource.php on line 225

Could anyone help with understanding the issue and possible solutions please?

  • Just to clarify, database credentials in local.xml are accurate. – Adam Oct 27 '18 at 22:46
  • Check in your local.xml there is no space or line breaks around the values. – BartZalas Oct 27 '18 at 23:12
  1. Navigate to the "errors" folder.
  2. Change local.xml.sample to local.xml
  3. You should now see a new list of crazy errors all over the Magento page - this is okay
  4. Open magento/lib/Zend/Cache/Backend/File.php and look for: protected $_options = array( 'cache_dir' => 'null',
  5. Change it to: protected $_options = array( 'cache_dir' => 'tmp/',
  6. Save it.
  7. Now the final step is to go create a tmp folder in the root Magento folder. That's it.
  • Thank you for your response but as you can see in my question, point 1, I have already done that. – Adam Oct 29 '18 at 0:16
  • Have you try this also - Change local.xml.sample to local.xml – Ankita Biswas Oct 29 '18 at 1:39

It's about line :

$this->_connectionTypes[$type] = new $typeClass();

So same like here

Check lines in local.xml do you have any spaces between lines and check in connection tags do you have :

  • Thank you for your response. There are no spaces and yes I have <type>pdo_mysql</type> in the connection tag – Adam Oct 29 '18 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.