when I try to compile after setup:upgrade
It displays for me blank page with error in log file:
main.INFO: Broken reference: the 'logger' element cannot be added as child to 'after.body.start', because the latter doesn't exist [] []
I used this code too to display errors in index.php
ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
$error = error_get_last();
echo("<pre>");
print_r($error);
}
The home page now display the following error
Array
(
[type] => 8192
[message] => Function mcrypt_module_close() is deprecated
[file] => C:\xampp\htdocs\magento\vendor\magento\framework\Encryption\Crypt.php
[line] => 112
)
Any suggestion?
Thanks,
Best Answer
I Have been searching a lot since no body helped me.
and the below solution worked with me
The Solution as follows:
Note I use Ubuntu 17 and I'm on localhost
first need to edit apache2 configuration.
use any editor to edit the this file path
Replace the following lines:
to:
restart apache:
the problem after compile
php bin/magento setup:di:compile
andphp bin/magento setup:static-content:deploy
the folder/var
magento deploy files and folders can't be accessed.so need to do the following:
Make sure you are in the following directory.
then use the following Command:
and this
Note: I don't know the right permissions for those two folders and I don't care cause i'm in localhost if you are in published website make sure the proper permissions for the files and folders. permisions with 777 can do security issue.