15

I tried to setup my magento to my hosting. So i created a new database and i did import my sql file and changed the settings in the local.xml for the database. but now i’m getting Exception printing is disabled by default for security reasons.

4

7 Answers 7

14

Rename the local.xml.sample in /errors to local.xml and you would be able to see the error and the entire stack trace.

Caution: This can lead to a security loop hole if used on a production server. Make sure you revert it once the error is resolved.

PS: To be even more secure. Restrict magento access only to your IP while exception printing is enabled

4
  • Post the error message that you see now to get any further help.
    – mosiac
    Jan 31, 2014 at 18:46
  • Openly viewable stack traces are a security breach, especially when one involving database access blows your admin credentials out there for the world to see. It's not that difficult to fire up the SCP/SFTP client and read the files. Feb 1, 2014 at 6:17
  • Thankyou for adding the caution and the IP lockdown suggestion. We've had a few people post stactraces with sensitive information over on MagentoCommerce.com. The stack traces occasionally can have login credentials even though that shouldn't happen. By the use of certain keywords, you can GoogleHack all the Magento sites that have either turned on public display or are still running the old versions that blythely displayed their dirty laundry to the world. Feb 2, 2014 at 1:04
  • Mage registry key "_singleton/Wiser_Search_Model_Observer" already exists Trace: #0 /Applications/MAMP/htdocs/in/app/Mage.php(223): Mage::throwException('Mage registry k...') #1 /Applications/MAMP/htdocs/in/app/Mage.php(477): Mage::register('_singleton/Wise...', false) #2 /Applications/MAMP/htdocs/in/includes/src/__default.php(22147): Mage::getSingleton('Wiser_Search_Mo...') #3 /Applications/MAMP/htdocs/in/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array) #4 /Applications/MAMP/htdocs/in/includes/src/__default.php(14381): Mar 29, 2017 at 5:45
7

Exception printing is disabled by default for security reasons

This is a page notifying you that a failure has occured that is so bad that Magento cannot run and is trying to tell you about it. Due to it being a stack trace that could notify unwanted parties that your site is so badly configured that it can be hacked, the Stack Trace that generated it is not displayed.

The number that shows up on that page every time Magento displays it is the name of a file.

Open up your SCP/SFTP client, navigate to your server directory var/report, sort by file creation date and start reading through the most recent files there.

When you ask for help, you can then post the stack trace of the most current errors that are preventing your Magento site from running so we can actually give you some useful help.

5

I also got this issue, just Googled and found solution here, you can do as followed:

  1. Locate the root directory where your Magento is installed. Search for “errors” directory.

  2. Change the filename of local.xml.sample to local.xml

  3. Reload the page where it shows error message, you will see a full list of error message – The purpose of rename local.xml is to allow the full error message to be shown.

  4. Now, locate magento_directory/lib/Zend/Cache/Backend/File.php and look for:

    protected $_options = array( 'cache_dir' => 'null', Replace it with: protected $_options = array( 'cache_dir' => 'tmp/', And save the file.

  5. Now, go to Magento root directory and create a new directory with the name “tmp”.

  6. Refresh the error page and see if the issue solved. Hope this helps

1

If you're getting a 404 error, try putting /index.php after your domain name. If that takes you to the home page, then the problem is that you either forgot to copy the .htaccess file (easy to do), mod_rewrite is not installed or AllowOverride is not set in your Apache config file. (I'm assuming that you're running on Apache, of course)

1
  • The /index.php it's given also a 404 error
    – Danny
    Jan 31, 2014 at 15:04
1

In error folder local.xml.sample is exist change the name to local.xml lib/Zend/Cache/Backend/File.php change the cache dir =null to tmp

1

Here is the solution:

  • Navigate to the "errors" folder.
  • Change local.xml.sample to local.xml
  • You should now see a new list of crazy errors all over the Magento page - this is okay.
  • Open magento/lib/Zend/Cache/Backend/File.php and look for:

    protected $_options = array(
    'cache_dir' => 'null',
    
  • Change it to:

    protected $_options = array(
    'cache_dir' => 'tmp/',
    
  • Save it.
  • Now the final step is to go create a tmp folder in the root Magento folder.
  • That's it.
1

The Easy and 100% working solution is rename cache file.

In Magento root folder var/cache

Then rename cache file name, and refresh your site.

2
  • your answer not working. Aug 18, 2015 at 9:38
  • Change the filename of local.xml.sample to local.xml again check what is error is showing, if still unable to solve ,please send me your error log i will check from my side.@ Prashant Tapase Jul 28, 2017 at 9:33

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