500 error in Magento 2 I faced at the time installation or up gradation of Magento, or while I backup the system on the product page or login admin page.
2 Answers
Where your folder is installed at the root, you will find the file index.php then you need to add these lines to view those 500 internal errors, then you can be able to fix them because you will be able to see the exact error.
Steps:- Edit your index.php file(present at the root folder of your installation)
add these lines in the begining then check..
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
// Report runtime errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// Report all errors
error_reporting(E_ALL);
// Same as error_reporting(E_ALL);
ini_set("error_reporting", E_ALL);
// Report all errors except E_NOTICE
error_reporting(E_ALL & ~E_NOTICE);
After then in the bootstrap.php also you need to add in the begining this code : app>bootstrap.php (inside your app folder)
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
give the pemission on root folder of magento 2
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;