9

When I'm tryin to install Magento 2 in the server it shows a blank page on installation(/setup/#/landing-install), like this image:

Magento install with blank page

Please suggest, what could be the issue?

2
  • 1
    Are you using nginx? Mar 21, 2020 at 15:26
  • I have also faced same issue. So I have change the PHP version 7.3 and Magento 2.3 now it is works like a charm :) Jan 2, 2021 at 13:26

6 Answers 6

3

I found out the problem was

the cgi.fix_pathinfo set to 0.

I have set it back to 1 as default and it now works fine.

Just ';' Uncomment first, and add '= 1'

2

As others have mentioned try making sure sure that your file permissions are set correctly:

File owner should always be Apache / www-data

Try setting the file permissions to 755 across the board for installation:

find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 755 {} \;
chmod u+x bin/magento

Potential Memory Issue

I have had issues before where I try to go to the Magento 2 installer in the browser, and it just says ERR:Empty Response or shows a blank screen. I discovered this was that my server was struggling to provide enough memory to run the installer interface.

If this is the issue try installing Magento using the command line installer:

php bin/magento setup:install 
--base-url="http://example.co.uk/" 
--db-host="localhost" 
--db-name="databasename" 
--db-user="databaseuser" 
--db-password="databasepass" 
--admin-firstname="Yourname" 
--admin-lastname="Yourname" 
--admin-email="[email protected]" 
--admin-user="admin" 
--admin-password="setpasswordhere" 
--language="en_GB" 
--currency="GBP" 
--timezone="Europe/London" 
--use-rewrites="1" 
--backend-frontname="admin"

I found this more suitable since I was having issues loading the installer interface but this didn't appear to require as much memory and finished quickly without any issues.

1
  • what is the file owner for Nginx?
    – Alston
    Oct 16, 2017 at 6:39
2

Run these commands on the root of your Magento installation to give the permissions on the folders and to update your composer to prevent more issues.

composer install && composer update -vvvv &&
find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \;
find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \;
chmod u+x bin/magento

Depending of your user, maybe you will need to use a sudo permit.

6
  • i got error if i install composer Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update Package fabpot/php-cs-fixer is abandoned, you should avoid using it. Use friendsofphp/php-cs-fixer instead. Generating autoload files
    – Magento 2
    Apr 26, 2017 at 15:57
  • Try don't use the composer install only the update Apr 26, 2017 at 16:13
  • it ask user name psw what i need to give
    – Magento 2
    Apr 26, 2017 at 16:22
  • Use this tutorial to generate yours. devdocs.magento.com/guides/v2.0/install-gde/prereq/… Apr 26, 2017 at 16:55
  • @RafaelCorrêaGomes : I have updated the composer and run command as mention above but did not work. Aug 11, 2017 at 9:20
1
  • If you get blank screen when installing wizard then check your .htaccess file may be issue of it.check all extension are installed or not.

And if you get blank screen after installed wizard then please follow below step.

  1. install magento with help of composer.
  2. install it via install wizard
  3. Give permission to folder,var,pub/media (Check permission)
  4. Install sample data with php bin/magento sampledata:deploy //install sample data
  5. upgrade with php bin/magento setup:upgrade
  6. compile with php bin/magento setup:di:compile

And then disable cache and set mode developer and clear static content

  1. php bin/magento cache:disable
  2. php bin/magento deploy:mode:set developer
  3. php bin/magento setup:static-content:deploy -f
1

This may be issue with DOM, Please install php dom as per your php version.

For php 7.0.X use below command :

sudo apt-get install php7.0-dom

don't forget to restart apache.

thanks

1

Can you make sure you have given correct permissions to your magento files and directories? devdocs.magento.com

Not the answer you're looking for? Browse other questions tagged or ask your own question.