How to install Magento 2 if install.log cannot be created
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:
- Create the phpinfo.php file (if you didn’t do that before).
- Proceed to your browser. Here, enter the following URL:
1http://<your web server IP or hostname>/<path to docroot>/phpinfo.php - Find your php.ini file. It is usually specified as Loaded Configuration File among the displayed results.
- Log in as a user with root privileges to edit the php.ini file
- Open it in a text editor.
- Find open_basedir.
- Replace its value with the one that enables the installation.
- Save your php.ini file.
- 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: