How to install Magento 2 if install.log cannot be created

- Fire development, Magento 2

Magento 2 export CLI

You try to install the Magento 2 software, but the installation fails. The Setup Wizard cannot create the install.log file. Below, we explain why it happens and how to solve the problem. If you cannot install Magento 2 since the Setup Wizard does not create install.log, you’ve come to the right place. For other tips, follow this link: Magento 2 Cookbook

'

The Issue

Usually, the Setup Wizard cannot create the installation log since several Magento 2 processes run simultaneously. For instance, you may launch two installations in separate tabs. It might result in problems with the install.log file and, as a result, the Magento 2 installation. 

The Solution

To reinstall the Magento 2 software successfully, you have to review setting for open_basedir that is situated in the php.ini file. The Setup Wizard receives the temporary directory value via the sys_get_temp_dir call. The Magento 2 installation fails when the open_basedir setting is set to refuse connections to a directory from the sys_get_temp_dir call.

You only have to set the appropriate value for open_basedir and restart the webserver to reinstall the software correctly:

  1. Create the phpinfo.php file (if you didn’t do that before).
  2. Proceed to your browser. Here, enter the following URL:

  3. Find your php.ini file. It is usually specified as Loaded Configuration File among the displayed results.
  4. Log in as a user with root privileges to edit the php.ini file
    1. Open it in a text editor.
    2. Find open_basedir.
    3. Replace its value with the one that enables the installation.
    4. Save your php.ini file.
  5. Now, you can restart the webserver.

That’s it! Now, you should install Magento 2 when install.log cannot be created. Don’t run two Magento processes simultaneously during the installation! Read this article to see more: Magento 2 installation fails; cannot create install.log.

'