Tag Archives: Magento 2 Installation

After successful installation Magento 2 getting blank page for admin login

After facing the same issue looking into the error area.
I have found a solution which is works for me.


The function isPathInDirectories added a line

 $realPath = str_replace('\\', '/', $realPath); 

Function details line number 133

protected function isPathInDirectories($path, $directories)
    if (!is_array($directories)) {
        $directories = (array)$directories;
    $realPath = $this->fileDriver->getRealPath($path);
    $realPath = str_replace('\\', '/', $realPath); // add this line here
    foreach ($directories as $directory) {
        if (0 === strpos($realPath, $directory)) {
            return true;
    return false;

It’s working fine now.

Magento 2.1.x in Ubuntu localhost Installation Guide 2017 | Magento 2 Tutorials

First, I’ll recommend to check the system requirements of Magento2 by clicking on this url
Magento 2.2.x technology stack requirements

      So first, install the Apache if you don’t have installed on your system by run following command.
       sudo apt-get install apache2 
      Then when go to the browser and hit on this url (http://localhost) you will see Apache2 Ubuntu default page. So you have installed Apache on your system successfully.
      Now install the mysql-server if you don’t have installed on your system by run following command.
       sudo apt-get install mysql-server 
      While install, if it’s asking to set the mysql root user password then type your desire password that you can remember on configuring mysql-server page. then run this command below
      Above screen you will asking for mysql root password and different questions, press y for all
      Now install php7.1
        sudo apt-get install php7.1 libapache2-mod-php7.1 php7.1-mcrypt php7.1-mysql 
        sudo apt-get install php7.1-gd php7.1-curl php7.1-intl php7.1-mbstring php7.1-zip
      I intentionally not mentioned some php extension here that i will fix in next steps
       sudo a2enmod rewrite 
       subl /etc/apache2/apache2.conf 
      if you don’t have sublime text then use nano or vim and find the line where it’s says like
      Directory /var/www/ and find the line with AllowOverride None then edit it to AllowOverride All
       sudo service apache2 restart 
       sudo apt-get install composer 
      Download phpMyAdmin by clicking on this url Download phpMyAdmin
      Then extract it into /var/www/html/ and rename this folder phpmyadmin
       sudo chown -R yourusername:root /var/www/html/ 
       cd /var/www/html/phpmyadmin 
       cp config.sample.inc.php config.inc.php 
       subl config.inc.php 
      Then follow the line $cfg[‘blowfish_secret’] = ” and change it to $cfg[‘blowfish_secret’] = ‘bhnvgtfcdefvghjklitgcdszxqwedcfp’
      Then browse this url (http://localhost/phpmyadmin) and login as root user with your given password
      Then create a database called magento2
      Then browse this url to download magento2 latest version zip file from github Download Magento2
      Then extract the zip file and rename it magento2 in this directory /var/www/html/
       cd /var/www/html/magento2 
       composer install 
      Run this commandbelow, if you have faced any error which is related to php extension
       sudo apt-get install php7.1-dom php7.1-xsl php7.1-simplexml 
       composer install 
       sudo service apache2 restart 
       sudo chmod -R 777 /var/www/html/magento2/ 
      Then browse this url to install magento (http://localhost/magento2/setup)
      add those line in /var/www/html/magento2/setup/index.php to see the error response if your browser says : This page is not working

      ini_set('display_errors', 1);
      ini_set('display_startup_errors', 1);
      Here it will ask you to set database name and database password that’s it.

Visit This URl if you don’t want to read. Install Magento2. Thank you 🙂