2

After Magento 2.2.1 CE upgrade I ended up situation that error report file is not created to /var/report directory.

There has been an error processing your request Exception printing is disabled by default for security reasons.

Error log record number: xxxxxxx"

Is there a developer mode which can show the error directly in browser? All advises are welcome.

  • 1
    what are the permissions on the folders? – treyBake Nov 23 '17 at 14:33
  • Full, It It has been working in old versions.... – user61125 Nov 23 '17 at 15:25
  • hmm so 777? that's a risk xD ok, if it's 777 then that shouldn;'t be the cause, how about the owners? – treyBake Nov 23 '17 at 15:27
  • it has been 775 and 777 for the test. It didn't help – user61125 Nov 23 '17 at 15:34
  • I mean the owner, not permissions :) should be something like user : webdev – treyBake Nov 23 '17 at 15:38
0

To answer your question, yes, yes there is. To enable the developer mode you need access to your terminal, in the magento root run this command:

php bin/magento deploy:mode:set developer

this sets Magento to developer mode, which displays errors in the browser for the "developer" to see. You can also achieve this (if the screen is just white) with the below code added into index.php:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(-1);

ini_set('error_reporting', E_ERROR);
register_shutdown_function('fatal_handler');
function fatal_handler()
{
    $error = error_get_last();
    echo ('<pre>');

    var_dump($error);
}

this should be enough to get the error on screen. If not, check your server error logs as opposed to Magento's to see if it's added there.

  • So far , No success. – user61125 Nov 23 '17 at 17:27
  • @user61125 what does going to a page look like after setting mode to developer? – treyBake Nov 24 '17 at 12:27
0

You can print directly to browser by renaming one of the files.

Rename local.xml.sample to local.xml in magento_root/pub/errors directory.

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.