cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4.7 does not work properly after successful installation

Magento 2.4.7 does not work properly after successful installation

I followed the tutorial and successfully installed Magento 2.4.7 twice today, but the website does not work. I’m not sure where I went wrong and how to fix this. 

https://www.linuxtuto.com/how-to-install-magento-2-4-7-on-ubuntu-24-04/

Screenshot_1.jpg

 

rEmpULTk

This page isn’t working right now http://www.123456.com can’t currently handle this request. HTTP ERROR 500

 

I Fix the File Permissions. Like this, https://www.cloudways.com/blog/magento-500-error/

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 777 {} \;
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chmod u+x bin/Magento

Now, the website shows the following error.

UnexpectedValueException: The stream or file "/var/www/magento//var/log/system.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/var/www/magento//var/log/system.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: Broken reference: the 'tracking' element cannot be added as child to 'header', because the latter doesn't exist in /var/www/magento/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:149
Stack trace:
#0 /var/www/magento/vendor/magento/framework/Logger/Handler/Base.php(98): Monolog\Handler\StreamHandler->write()
#1 /var/www/magento/vendor/magento/framework/Logger/Handler/System.php(65): Magento\Framework\Logger\Handler\Base->write()
#2 /var/www/magento/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Magento\Framework\Logger\Handler\System->write()
#3 /var/www/magento/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\Handler\AbstractProcessingHandler->handle()
#4 /var/www/magento/vendor/monolog/monolog/src/Monolog/Logger.php(650): Monolog\Logger->addRecord()
#5 /var/www/magento/vendor/magento/framework/Logger/LoggerProxy.php(140): Monolog\Logger->error()
#6 /var/www/magento/vendor/magento/framework/App/Bootstrap.php(269): Magento\Framework\Logger\LoggerProxy->error()
#7 /var/www/magento/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#8 {main}

 

1 REPLY 1

Re: Magento 2.4.7 does not work properly after successful installation

Hello @Modest,

 

Seems like issue is with web server user.

Make sure the web server user and group is same as files.

 

You can add below line in pub/index.php :

echo exec('whoami');
exit;

It will show you the web user, compare with files user and group.

 

if the web user is www-data, you should change it to as per your file system.

 

I hope it helps. 

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy