cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Error 500 / Blank page

Highlighted

HTTP Error 500 / Blank page

Hi new to Magento here,

 

My first question would be, are there any issues with using root to do the apache/php/composer downloads, as well as downloading magento (but not installing), and then creating the magento user, giving it file permissions and running the installations from there? That's what I've done, and I haven't encountered any file permission issues so far, but I am obviously getting HTTP error 500.

 

Other than that, I've followed the file permission page, ran the command to give permissions, added magento to apache usergroup, then changed ownership of the /var/www/html/magento2 to magento:apache.

 

I tried not doing that once, and I got autoload error, if I give file permissions I am getting HTTP error 500.

 

Could this be an issue with my PHP version (7.4.7)? Other than that I am kind of at a loss here.

6 REPLIES 6
Highlighted

Re: HTTP Error 500 / Blank page

@louisphilibadc 

 

Please downgrade your php version as Magenot 2.3 supports below shared PHP version:

https://devdocs.magento.com/guides/v2.3/install-gde/prereq/prereq-overview.html

 

After that just run below commands:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento c:f
chmod -R 0777 var/ pub/ generated/
Manish Mittal
https://www.manishmittal.com/
Highlighted

Re: HTTP Error 500 / Blank page

I am using Magento 2.4, which supposedly supports 7.4, should I still downgrade to PHP 7.3 for Magento 2.4?

Highlighted

Re: HTTP Error 500 / Blank page

So I downgrade to PHP 7.3 anyways but I still get the same issue.

Highlighted

Re: HTTP Error 500 / Blank page

@louisphilibadc 

 

#/vendor/magento/framework/View/Element/Template/File/Validator.php:140

the string

if (0 === strpos($realPath, $directory)) {
    return true;
}

to replace

$realDirectory = $this->fileDriver->getRealPath($directory);
if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
   return true;
}

 

for more you can look here:

https://meetanshi.com/blog/solved-magento-2-2-7-and-2-3-admin-page-blank-issue/

Manish Mittal
https://www.manishmittal.com/
Highlighted

Re: HTTP Error 500 / Blank page

Hi @louisphilibadc,

 

Please try the following command to show the issue that you're facing. 

php bin/magento deploy:mode:set developer

 

Let me know if you need further assistance. Hope it helps!

 

_____________

If issue solved, Click Kudos & Accept as Solution.

Marcus | LitExtension Expert
Shopping Cart Migration Service
Highlighted

Re: HTTP Error 500 / Blank page

Finally solved it but this was a bunch of issues one after the other.

The first one was that I didn't configure Apache properly, once I switched to nginx I found a better guide to configure a virtual host and configure php-fpm.

 

Then I had permissions issues which stemmed from SElinux which is integral to centos8, so had to chcon /var/www/html/.

 

After that it was a breeze, installed sample-data and then setup redis on both localhost and a remote host.