Magento exception printing is disabled by default for security reasons – How to fix?


As a Magento developer, we need to know common Magento 1.x and Magento 2.x error, how to debug, how to fix the error. In this tutorial for beginner, we will guide you how to debug and solution to fix one of the most common error in Magento 1.x and Magento 2: “There has been an error processing your request, Exception printing is disabled by default for security reasons

Quick Navigation


Why we see this error message?: When working with Magento, usually you will see the message (normally you will see this when installing Magento, installing new theme/extensions). This is generally caused by conflict in themes, extensions or database/resource shortage…

Solutions for Magento 1.x

Now, I will provide several solutions to this errors, you can try every or all solution until you can fix your issue.

1. Delete/rename cache folder

Do this first, 90% you will get the error fixed.

First, go to root folder var/cache

delete rename magento cache

Now you can rename or just remove all cache files, and refresh your Magento site to see if the error is gone.

2. Check error log record

As you can see the error message: Error log record number: xxxxxxxxxx, here xxxxxxxxxx is the name of log file we need to check. All error log files are located in Magento/var/report folder, just open file manager and go to that folder and find the corresponding file and read the log to find solution.

3. Enable printing errors

If the solution above doesn’t help, you can enable printing errors to check what problems caused the error. To do this follows these steps:

Step 1: go to folder  Magento/errors

There you will see  local.xml.sample  file, just rename it to  local.xml , the purpose of this action is to enable error printing in Magento

Step 2: Reload the error page and you will see the full list of error message, this will help you fix the issue

4. Enable Magento exception printing

We can also enable Magento exception printing to get more details report on the error. To do this,

Step 1: in admin panel of Magento go to System > Configuration > Developer > Log Settings. Now change Log Setting to “Yes”

enable magento error and exception log

Step 2: You can find system.log and exception.log in Magento/var/log. As per my experience, you will see the following error in exception.log

Now we need to specify a cache_dir for Magento, go to the file /lib/Zend/Cache/Backend/File.php, find:

change it to;

enable cache dir magento

Next, go to Magento root folder and create: /tmp folder

magento tmp

Finally, refresh the page to see if the issue is fixed.

For Magento 2

You may also see this error in Magento 2, just like Magento 1, we will need to enable exception printing in Magento 2. The local.xml file in Magento 2 is located in pub/errors/, now we will rename local.xml.sample  to   local.xml .

local.xml.sample magento 2

Now reload your error page to see debug messages on the page rather than just  exception printing is disabled by default for security reasons , something like this

Now you will see what you need to do next, normally we will have to clear Magento cache as in Magento 1, in some case you will need to repair corrupted table in your Magento 2 Databse, that depends on the error logs you see.


All the solutions I mentioned in this tutorial on Magento explorer is based on my personal experience, if you have more solutions please let us know by dropping a line comment section below.

Hope you find this article helpful

Magento exception printing is disabled by default for security reasons – How to fix?
4.04 (80.86%) 70 votes


About Author

Daniel is a Magento developer with 5 years of experience with customizing Magento extensions, Magento templates. He's main author at Magento explorer


  1. Thank you for the solution, I deleted cached folder of my Magento installation and the error “exception printing is disabled by default for security reasons” is solve.

  2. Hi I followed your instructions except for one…
    the last part by adding tmp folder… tmp folder already exists so i couldnt add it..
    It did fix my issue though, i was able to get rid of that error..
    But now I’m facing another problem on my magento backend page.

    There has been an error processing your request
    cache_dir must be a directory

    #0 /home/joyomark/public_html/lib/Zend/Cache/Backend/File.php(154): Zend_Cache::throwException(‘cache_dir must …’)
    #1 /home/joyomark/public_html/lib/Zend/Cache/Backend/File.php(121): Zend_Cache_Backend_File->setCacheDir(‘tmp/’)

    I was wondering maybe it’s because i wasn’t able to do the last part of your instruction or what..Can u also help me on this one pleaseeee…

  3. how fix the errors —> Index\sql\index_setup\install-” – SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘index_event’ already exists

  4. if you mi-spell the word ‘tmp/’ you might get this error cache_dir must be a directory. in my case i had put the wrong apostrophe (quotes)

  5. Hi Daniel,
    My problem is same but bigger. Actually my developer lives overseas. He built and designed my website. My online store was working fine. He got all money but now not responding. I don’t have any developer login details. But I have my login details for website admin panel and connect Manager. Could I do something from there. Or I have looted by a bugger? Please reply.

  6. Hello.. this error keep pops up when i tried to login to shopping website.. this also happen in all device such as phone , laptop .. what should i do ?

  7. Error Show Upper all steps follow…
    Plz Solve this and help…

    SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘CONCAT( REPEAT( “— “, (COUNT(parent.depth) – 1) ) , main_table.title)’ in ‘field list’, query was: SELECT main_table.*, mgroup.title AS group_name, CONCAT( REPEAT( "--- ", (COUNT(parent.depth) - 1) ) , main_table.title) AS name FROM mg_sm_menu_items AS main_table
    INNER JOIN mg_sm_menu_groups AS mgroup ON = main_table.group_id
    CROSS JOIN mg_sm_menu_items AS parent WHERE (main_table.lft BETWEEN parent.lft AND parent.rgt) AND (parent.group_id = main_table.group_id) GROUP BY ORDER BY main_table.group_id ASC, main_table.lft ASC, id ASC LIMIT 20

  8. Hi Daniel, I have a Problem with my site and I am not sure about the steps mentioned above would solve the Problem. So, before I do anything I thought I’d better ask for an advice.
    Would you mind to have a quick look at my website and tell me what kind of problem that is and maybe where I can fix it also?

    Kind regards,

    • The error on your site is Database error, maybe its corrupted or you are using a wrong database for your site. You can try repairing the database and let us know the result

  9. This keeps coming up while I try to go on a phones website. Help? it says:

    Exception printing is disabled by default for security reasons.

    Error log record number: 764230038611

    Magento is a trademark of Magento Inc. Copyright © 2015 Magento Inc.

    But I’m just trying to shop online, I’m not installing anything…

    • Hello Natalia, you can ask web owner of that website to fix the error, you are a visitor so you can’t do anything to fix that error.

  10. Hi Daniel, how can we fix this error. Please advise us what to do.

    Notice: Undefined index: in /var/www/vhosts/ on line 64

    Thank you,

Leave A Reply