Fixing Magento 2.0 installation issues
A few months back official release of Magento 2.0 was announced and it comes with many exciting E-commerce benefits. In our previous blog post ‘What is New and How to Migrate for Magento 2.0 Upgrade?‘, we have already elaborated Magneto 2.0 upgrade and its various new important features.
Out of many new Magento 2.0 features, one important feature named ‘Readiness Check’ helps to check whether your system is fitted with the required version of server’s configuration and dependencies or not.
‘Readiness Check’ usually detects errors of any incompatible version or misconfiguration of your dependencies and then it will show the errors details and does not allow you to proceed to the next step i.e. database configuration.
While installing Magento 2.0 E-commerce store, there can be chances when you may slip into some unexpected issues.
In this blog, we have outlined some common issues usually encountered during Magento 2.0 installation process and also the necessary steps to troubleshoot all these issues.
We hope this will help you a lot to get an easy time while installing Magento 2.0. If you need help our team can help you with Magento installation and setup.
ISSUE 1
CSS AND JAVASCRIPT NOT LOADING IN FRONT-END:-
While trying to install and run Magento 2.0 you may encounter ‘404 response error’ with no CSS styles or javascript loading. On a local server, Magento 2.0 can try to create symlinks for some static resources, when not in production mode. So, you have to change its behavior.
Solution:
To fix this issue;
- Edit file-
ROOT > app > etc > di.xml
. - In your code editor; Open
di.xml
> find-virtualType name="developerMaterialization"
section. - Find an item
that requires modification.
- Change and modify the following content:
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink
- After editing it will be shown as;
Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
.
- Finally, delete all old files in
ROOT > pub > static > DELETE ALL EXCEPT.HTACCESS
ISSUE 2
PHP SETTINGS CHECK ERROR:-
always_populate_raw_post_data error
During Magento 2 installation, it is the most common error. There can be a possibility that this error may cause due to a misconfiguration in php.ini
file.
Solution:
1. Open your php.ini
file.
2. Find always_populate_raw_post_data
, uncomment the line and set it to -1.
3. Save php.ini
4. Restart php or your web server.
Fixing this issue is quite easy;
- Go to the root folder and locate your
php.ini
file. - Use a line of code in your project file to find php.ini, i.e.
. This will display your PHP information automatically.
- Open php.ini to find-
always_populate_raw_post_data
. It will show like this:;always_populate_raw_post_data = On
- Now remove- semi-colon (;) or comment before the line of code > Change the On or 1 to -1.
It will display like this: always_populate_raw_post_data = -1
- Save
php.ini
and restart php or your web server.
Note: Editing done above will turn on the setting and its value of -1 should fix the ‘PHP Settings Check Error’.
ISSUE 3
CHECKING PHP EXTENSIONS:-
php_intl.dll PHP missing
extension error
Most of the time, PHP extensions are either off or commented. This may cause an error during Magento 2.0 installation. Here, the main cause of error is due to the most common extension in Magento 2.0 that is php_intl.dll
.
Solution:
- Locate your
php.ini file
> Search for fileยphp_intl.dll
.
The line of code would look like this- ;extension=php_intl.dll
.
- Remove the comment or the semi-colon (;)
It will be shown as- extension=php_intl.dll
Editing with above steps also activates the extension called php_intl.dll
. Again run the ‘Readiness Check’ to fix the problem.
Now cheers! you can proceed to the next step of Magento 2.0 installation- Database Setup.
ISSUE 4
PROBLEM IN ROUTING:-
Redirect Loop Error
‘A redirect loop error’ is usually encountered while accessing a page involving database configuration.
In this error, on top domains like the local-host, cookies are not well supported by browsers.
Solution:
To fix this issue;
- Go to control panel > Open database > Find
core_config_data.
- Now open c
ore_config_data
and find the path and value in the upper part of the table. - Then, find the column to locate
web/unsecure/base_url and web/secure/base_url
. - Edit values from
http://localhost/*foldername*/ to http:// 127.0.0.1/*foldername*/
. - Clear cache after changing above mentioned values from the root folder of your project.
- Open the var folder > Go to cache folder,
/var/cache/
- In the cache folder, delete all folders and files to remove the temporary data and cached settings.
Again try to access the same folder and the issue will beย fixed!
We hope, above described Magento 2.0 installation issues and troubleshooting will help you a lot in case you get stuck with any one of them.
In case you are still not able to fix your Magento 2.0 installation errors, you can consider hiring us. We are a leading Magento Development company in India and have an inhouse team of experience magento developers who can help you resolve issues on your magento store.