Solved – All Errors while installing Magento2

This article helps in resolving the issues while installing Magento2. The following are the issues which you may meet, feel free to apply the solution given.

 

Error 1: –

“SQLSTATE[HY000] [2002] No such file or directory”

Solution :-Β 

In the php bin/magento setup:installcommand,Β  replace --db-host="localhost" with --db-host="127.0.0.1" and re-run the command again.


Error 2: –

In compat.php line 1927: This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP

Solution: –Β To resolve this error, please click here.


Error 3: –

In Admin Login –

You did not sign in correctly or your account is temporarily disabled” in Magento 2

Solution:-Β There are various solutions for resolving it. Please have a look here.


Error 4: –

Magento 2 – Allowed Memory exhausted error

Solution:-Β The cause of the error β€œallowed memory size of bytes exhausted” is related to shortage of memory. The error occurs if you try toΒ use more RAM resourcesΒ than what you haveΒ specified in the php.iniΒ file through β€œmemory_limit”.

There are various solutions for this. Please follow this link for solution.


Error 5:-

No connection could be made because the target machine actively refused it

Solution:-Β This error is related to the elasticsearch. You can get solution here.


Error 6:-

Composer error in setup:upgrade command in Magento2

If you are stuck with composer error while running

phpΒ bin/magento setup:upgrade

this command in Magento2, not to worry at all. This article is here to help you out.

Running data recurring...Reading C:\xampp\htdocs\magento/composer.json
Loading config file C:\xampp\htdocs\magento/composer.json
Failed to initialize global composer: Composer could not find the config file: C:/xampp/htdocs/magento/var/composer_home/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading C:\xampp\htdocs\magento/vendor/composer/installed.json
Reading C:\xampp\htdocs\magento/composer.lock
Checking for "magento/composer-root-update-plugin: 1.1.1" for the Web Setup Wizard...
Reading C:\xampp\htdocs\magento/var/vendor/magento/composer-root-update-plugin/composer.json Loading config file C:\xampp\htdocs\magento/var/vendor/magento/composer-root-update-plugin/composer.json No Web Setup Wizard update needed for magento/composer-root-update-plugin; version 1.1.1 is already in C:\xampp\htdocs\magento/var.

 

Solution:-Β Get resolved here.


Error 7:-

Deprecated: MethodΒ  ReflectionParameter::getClass()Β  isΒ deprecatedΒ in

C:\xampp\htdocs\m2\vendor\magento\framework\Code\Reader\ClassReader.phpΒ onΒ lineΒ 34

Solution:-Β Right now Magento 2 does not support PHP 8, so this error occurs. You can get more details here.


Error 8:-

Magento2 Installation Error – Sample data is installed with errors. See log file for details

Solution:-Β The details of the solution is mentioned here, have a look and get it resolved here.


Error 9:-

Magento2 Installation Error – Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

Solution:-Β Solved here. See details


Error 10:-

Solved- Class β€œMagento\Backend\App\Request\PathInfoProcessor\Proxy” does not exist

Reason & Solution 1:

First reason could be you have installed PHP 8 and Magento2 is not compatible with it yet. So to resolve this, you need to use PHP 7.4.

Reason & Solution 2:

Second reason we need to find with below steps:

    • Open theΒ bootstrap.phpΒ file present in theΒ appΒ folder ofΒ magento directory.
    • Remove # from the beginning of the line
      • #ini_set(β€˜display_errors’, 1);
    • Save the file and refresh your browser to see the exact issue.

Follow this for more details.


Error 11:-

Apache Service detected with wrong path

Solution:

Here’s the fix:
  1. Window + R and type regedit then enter
  2. Open this directory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4
  3. Right-click on the β€œImagePath” and choose β€œModify”
  4. Change the Value Data field with your current installed path of apache in XAMPP
  5. In my case, the value is β€œC:\xampp\apache\bin\httpd.exe” -k runservice
  6. For the question poster case, change the value to β€œc:\xampp\apache\bin\httpd.exe” -k runservice
  7. Close the Xampp Control panel and Open Again.

Follow this for more details.

 

We love hearing your feedback. Thank you commenting in advance!!

Happy Learning !!

Thank You !!