Blog

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 !!

 

38 thoughts on “Solved – All Errors while installing Magento2

  1. Hi,,
    I got this error while installing magento 2.4.4
    C:\xampp\htdocs\magento2>php bin/magento setup:install –base-url=”http://jhn.magento244.com/” –db-host=”localhost” –db-name=”magento244″ –db-user=”root” –db-password=”root” –admin-firstname=”admin” –admin-lastname=”admin” –admin-email=”user@example.com” –admin-user=”admin” –admin-password=”Admin@123456″ –language=”en_US” –currency=”USD” –timezone=”America/Chicago” –use-rewrites=”1″ –backend-frontname=”admin” –search-engine=elasticsearch7 –elasticsearch-host=”localhost” –elasticsearch-port=9200
    SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES)

    In InstallCommand.php line 282:

    Parameter validation failed

    1. Sonal Motghare-Balpande

      Please check the mysql password. Try with not mentioning any password,

      C:\xampp\htdocs\magento2>php bin/magento setup:install –base-url=”http://jhn.magento244.com/” –db-host=”localhost” –db-name=”magento244″ –db-user=”root” –db-password=”” –admin-firstname=”admin” –admin-lastname=”admin” –admin-email=”user@example.com” –admin-user=”admin” –admin-password=”Admin@123456″ –language=”en_US” –currency=”USD” –timezone=”America/Chicago” –use-rewrites=”1″ –backend-frontname=”admin” –search-engine=elasticsearch7 –elasticsearch-host=”localhost” –elasticsearch-port=9200

  2. Dear Sonal

    Can you please help me to solve problem with installing Magento2?

    I`m trying to run this code: php bin/magento setup:installΒ –base-url=http://andriy.magento.comΒ –db-host=localhostΒ –db-name=magento2Β –db-user=magento2Β –db-password=mypasswordΒ –admin-firstname=AdminΒ –admin-lastname=AdminΒ –admin-email=admin@admin.comΒ –admin-user=adminΒ –admin-password=mypasswordΒ –language=en_USΒ –currency=USDΒ –timezone=America/ChicagoΒ –backend-frontname=adminΒ –search-engine=elasticsearch7Β –elasticsearch-host=localhostΒ –elasticsearch-port=9200

    But I get an error: “There are no commands defined in the “setup:installΒ –base-url=http” namespace.”

    Can you please help me?

      1. This command sudo php bin/magento setup:installΒ –base-url=manmeet.magento.comΒ –db-host=localhostΒ –db-name=magento2Β –db-user=magento2Β –db-password=random@123–admin-firstname=AdminΒ –admin-lastname=AdminΒ –admin-email=admin@admin.comΒ –admin-user=adminΒ –admin-password=Admin@123456Β –language=en_USΒ –currency=USDΒ –timezone=America/ChicagoΒ –backend-frontname=adminΒ –search-engine=elasticsearch7Β –elasticsearch-host=localhostΒ –elasticsearch-port=9200

        In ErrorHandler.php line 61:

        Warning: levenshtein(): Argument string(s) too long in /var/www/html/magento2
        /vendor/symfony/console/Application.php on line 1169

        What could be the issue?

  3. Hello

    I managed to complete all steps successfully but when the time came to fill on browser the http://myname.magento.com, the browser started refresh the page non stop without any result.

    I have no idea what to do next.

    Any help would be appreciated.

    Thank you in advance.

    You rock πŸ™‚

  4. When i run the following command

    gogo@gogo:/var/www/html/magento2$ php bin/magento setup:installΒ –base-url=http://shahzad.magento.com –db-host=localhostΒ –db-name=magento2Β –db-user=magento2Β –db-password=rootΒ –admin-firstname=adminΒ –admin-lastname=adminΒ –admin-email=admin@admin.comΒ –admin-user=adminΒ –admin-password=adminΒ –language=en_USΒ –currency=USDΒ –timezone=America/ChicagoΒ –backend-frontname=adminΒ –search-engine=elasticsearch7Β –elasticsearch-host=localhostΒ –elasticsearch-port=9200

    i get this error

    There are no commands defined in the “setup:installΒ –base-url=http” namespace.

    Did you mean one of these?
    setup
    setup:config
    setup:db
    setup:db-data
    setup:db-schema
    setup:di
    setup:performance
    setup:static-content
    setup:store-config

  5. Hi,
    After running the below command, I am getting the following error:

    **php bin/magento setup:install –base-url=β€œhttp://devi.magento.com” –db-host=β€œ127.0.0.1” –db-name=β€œmagento2” –db-user=β€œroot” –db-password=β€œDevi@123” –admin-firstname=β€œadmin” –admin-lastname=β€œadmin” –admin-email=β€œuser@example.com” –admin-user=β€œadmin” –admin-password=β€œadmin123” –language=β€œen_US” –currency=β€œUSD” –timezone=β€œAmerica/Chicago” –use-rewrites=β€œ1” –backend-frontname=β€œadmin” –search-engine=elasticsearch7 –elasticsearch-host=β€œlocalhost” –elasticsearch-port=9200**

    In Abstract.php line 144:
    SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: NO)

    In Abstract.php line 128:
    SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: NO)

    Can you help me with this?

  6. In Mysql.php line 599:

    SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘magento.design_config_grid_flat’ doesn’t exist, query wa
    s: DELETE FROM `design_config_grid_flat`

    In Mysql.php line 110:

    SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘magento.design_config_grid_flat’ doesn’t exist, query wa
    s: DELETE FROM `design_config_grid_flat`

    In Mysql.php line 91:

    SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘magento.design_config_grid_flat’ doesn’t exist

    after change localhost to 127.0.0.1 it still showed

  7. C:\xampp\htdocs\magento2>php bin/magento setup:install –base-url=”http://var.magento2.com/” –db-host=”localhost” –db-name=”magento2″ –db-user=”root” –db-password=”root” –admin-firstname=”admin” –admin-lastname=”admin” –admin-email=”user@example.com” –admin-user=”admin” –admin-password=”Admin@123456″ –language=”en_US” –currency=”USD” –timezone=”America/Chicago” –use-rewrites=”1″ –backend-frontname=”admin” –search-engine=elasticsearch7 –elasticsearch-host=”localhost” –elasticsearch-port=9200

    SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES)

    In InstallCommand.php line 282:

    Parameter validation failed

    i get 1045 error plz suggest me to fix it

    1. Sonal Motghare-Balpande

      Thanks for contacting, please follow the below steps :
      1. On Xampp, click on Shell button to open command interface,
      2. Next, input the following command to change mysql root password

      mysqladmin.exe -u root password root

      3. go to C:\xampp\phpMyAdmin\config.inc.php and insert your password ‘root’
      4. Restart Apache

      1. Hello madame, I get the same error 1045, Tried to follow your instruction, pasting the command at step 2 fails… I get this error “Access dennied”

        cmd response

        Agatha@DESKTOP-xxxxxx c:\xampp
        # mysqladmin.exe -u root password root
        mysqladmin.exe: connect to server at ‘localhost’ failed
        error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’

  8. Hello mam,

    I am getting the below error while installing magento2 in windows –

    1 exception(s):
    Exception #0 (Exception): Warning: Use of undefined constant SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES – assumed ‘SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES’ (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\magento2\vendor\magento\framework\Encryption\Adapter\SodiumChachaIetf.php on line 40

    Exception #0 (Exception): Warning: Use of undefined constant SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES – assumed ‘SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES’ (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\magento2\vendor\magento\framework\Encryption\Adapter\SodiumChachaIetf.php on line 40
    #1 Magento\Framework\Encryption\Adapter\SodiumChachaIetf->encrypt() called at [vendor\magento\framework\Encryption\Encryptor.php:399]
    #2 Magento\Framework\Encryption\Encryptor->encryptWithFastestAvailableAlgorithm() called at [vendor\magento\module-config\App\Config\Type\System.php:339]
    #3 Magento\Config\App\Config\Type\System->cacheData() called at [vendor\magento\framework\Cache\LockGuardedCacheLoader.php:137]
    #4 Magento\Framework\Cache\LockGuardedCacheLoader->lockedLoadData() called at [vendor\magento\module-config\App\Config\Type\System.php:281]
    #5 Magento\Config\App\Config\Type\System->loadDefaultScopeData() called at [vendor\magento\module-config\App\Config\Type\System.php:207]
    #6 Magento\Config\App\Config\Type\System->getWithParts() called at [vendor\magento\module-config\App\Config\Type\System.php:181]
    #7 Magento\Config\App\Config\Type\System->get() called at [vendor\magento\framework\App\Config.php:132]
    #8 Magento\Framework\App\Config->get() called at [vendor\magento\module-backend\App\Config.php:51]
    #9 Magento\Backend\App\Config->getValue() called at [vendor\magento\module-backend\App\Area\FrontNameResolver.php:109]
    #10 Magento\Backend\App\Area\FrontNameResolver->getFrontName() called at [vendor\magento\module-backend\Helper\Data.php:209]
    #11 Magento\Backend\Helper\Data->getAreaFrontName() called at [vendor\magento\module-backend\App\Request\PathInfoProcessor.php:50]
    #12 Magento\Backend\App\Request\PathInfoProcessor->process() called at [generated\code\Magento\Backend\App\Request\PathInfoProcessor\Proxy.php:95]
    #13 Magento\Backend\App\Request\PathInfoProcessor\Proxy->process() called at [vendor\magento\framework\App\Request\Http.php:148]
    #14 Magento\Framework\App\Request\Http->getOriginalPathInfo() called at [vendor\magento\framework\App\Request\Http.php:163]
    #15 Magento\Framework\App\Request\Http->getPathInfo() called at [vendor\magento\framework\App\Request\Http.php:213]
    #16 Magento\Framework\App\Request\Http->getFrontName() called at [vendor\magento\framework\App\Http.php:111]
    #17 Magento\Framework\App\Http->launch() called at [generated\code\Magento\Framework\App\Http\Interceptor.php:23]
    #18 Magento\Framework\App\Http\Interceptor->launch() called at [vendor\magento\framework\App\Bootstrap.php:264]
    #19 Magento\Framework\App\Bootstrap->run() called at [pub\index.php:30]

    1. Sonal Motghare-Balpande

      Thanks for contacting Nikhil Kishore.
      Please follow below steps:
      1. Remove semicolon from the beginning of the line ;extension=sodium from php.ini which enables it.
      2. Copy (wherever you have installed xampp that drive )D:\xampp8.1\php\libsodium.dll to D:\xampp8.1\apache\bin\
      3. Restart Apache means stop and start Apache.

      Thanks,
      Sonal

  9. Luego de instalar todo e ir al navegador me aparece:

    Forbidden
    You don’t have permission to access this resource.

    Apache/2.4.51 (Win64) OpenSSL/1.1.1l PHP/8.1.0 Server at sonal.magento.com Port 80

  10. In Installer.php line 546:
    Missing following extensions: β€˜sodium’

    However its already enable and restart xampp twice

    can you please help me!

    1. Sonal Motghare-Balpande

      Thanks for contacting Sofiya.
      Please follow below steps:
      1. Remove semicolon from the beginning of the line ;extension=sodium from php.ini which enables it.
      2. Copy (wherever you have installed xampp that drive )D:\xampp8.1\php\libsodium.dll to D:\xampp8.1\apache\bin\
      3. Restart Apache means stop and start Apache.

      Thanks,
      Sonal

  11. Undefined class constant ‘PDO::MYSQL_ATTR_SSL_KEY’#0 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\ConfigModel.php(71): Magento\Setup\Model\ConfigOptionsList->getOptions()
    #1 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Console\Command\ConfigSetCommand.php(61): Magento\Setup\Model\ConfigModel->getAvailableOptions()
    #2 C:\xampp\htdocs\magento\vendor\symfony\console\Command\Command.php(77): Magento\Setup\Console\Command\ConfigSetCommand->configure()
    #3 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Console\Command\ConfigSetCommand.php(51): Symfony\Component\Console\Command\Command->__construct()
    #4 C:\xampp\htdocs\magento\vendor\laminas\laminas-di\src\Injector.php(181): Magento\Setup\Console\Command\ConfigSetCommand->__construct()
    #5 C:\xampp\htdocs\magento\vendor\laminas\laminas-di\src\Injector.php(140): Laminas\Di\Injector->createInstance()
    #6 C:\xampp\htdocs\magento\vendor\laminas\laminas-di\src\Container\AutowireFactory.php(64): Laminas\Di\Injector->create()
    #7 C:\xampp\htdocs\magento\vendor\laminas\laminas-di\src\Container\ServiceManager\AutowireFactory.php(51): Laminas\Di\Container\AutowireFactory->create()
    #8 C:\xampp\htdocs\magento\vendor\laminas\laminas-servicemanager\src\ServiceManager.php(665): Laminas\Di\Container\ServiceManager\AutowireFactory->__invoke()
    #9 C:\xampp\htdocs\magento\vendor\laminas\laminas-servicemanager\src\ServiceManager.php(230): Laminas\ServiceManager\ServiceManager->doCreate()
    #10 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Console\CommandList.php(88): Laminas\ServiceManager\ServiceManager->get()
    #11 C:\xampp\htdocs\magento\vendor\magento\framework\Console\Cli.php(148): Magento\Setup\Console\CommandList->getCommands()
    #12 C:\xampp\htdocs\magento\vendor\magento\framework\Console\Cli.php(134): Magento\Framework\Console\Cli->getApplicationCommands()
    #13 C:\xampp\htdocs\magento\vendor\symfony\console\Application.php(1274): Magento\Framework\Console\Cli->getDefaultCommands()
    #14 C:\xampp\htdocs\magento\vendor\symfony\console\Application.php(629): Symfony\Component\Console\Application->init()
    #15 C:\xampp\htdocs\magento\vendor\symfony\console\Application.php(237): Symfony\Component\Console\Application->find()
    #16 C:\xampp\htdocs\magento\vendor\magento\framework\Console\Cli.php(115): Symfony\Component\Console\Application->doRun()
    #17 C:\xampp\htdocs\magento\vendor\symfony\console\Application.php(149): Magento\Framework\Console\Cli->doRun()
    #18 C:\xampp\htdocs\magento\bin\magento(23): Symfony\Component\Console\Application->run()
    #19 {main}
    this was the error man

  12. After running the following command. i am getting the following error. Can you help on this please?

    php bin/magento setup:install –base-url=”http://ghugan.magento.com/” –db-host=”localhost” –db-name=”magento24″ –db-user=”root” –db-password=”root” –admin-firstname=”admin” –admin-lastname=”admin” –admin-email=”user@example.com” –admin-user=”admin” –admin-password=”admin123″ –language=”en_US” –currency=”USD” –timezone=”America/Chicago” –use-rewrites=”1″ –backend-frontname=”admin” –search-engine=elasticsearch7 –elasticsearch-host=”localhost” –elasticsearch-port=9200

    In Config.php line 449:

    Invalid entity_type specified: customer

  13. hello ma’am,

    while running this code “C:\xamp\htdocs\magento2>php bin/magento setup:install –base-url=”http://rakshith.magento.com/” –db-host=”localhost” –db-name=”magento2″ –db-user=”root” –db-password=”root” –admin-firstname=”admin” –admin-lastname=”admin” –admin-email=”user@example.com” –admin-user=”admin” –admin-password=”Admin@123456″ –language=”en_US” –currency=”USD” –timezone=”America/Chicago” –use-rewrites=”1″ –backend-frontname=”admin” –search-engine=elasticsearch7 –elasticsearch-host=”localhost” –elasticsearch-port=9200″ in “Command Prompt”,it shows following error,

    In Installer.php line 546:

    Missing following extensions: ‘sodium’

    Thank you!

  14. hello ma’am,
    while running this code “php bin/magento setup:install –base-url=”http://rakshith.magento.com/” –db-host=”localhost” –db-name=”magento2″ –db-user=”root” –db-password=”root” –admin-firstname=”admin” –admin-lastname=”admin” –admin-email=”user@example.com” –admin-user=”admin” –admin-password=”Admin@123456″ –language=”en_US” –currency=”USD” –timezone=”America/Chicago” –use-rewrites=”1″ –backend-frontname=”admin” –search-engine=elasticsearch7 –elasticsearch-host=”localhost” –elasticsearch-port=9200″ in COMMAND PROMPT it will showing following error:

    In Installer.php line 546:
    Missing following extensions: ‘sodium’

    can you please help me!

  15. Dear Ma’am

    When I installed Magento in my system then one problem was found and I do not solve this issue please kindly check (it is presented in composer)

    Class “Magento\Backend\App\Request\PathInfoProcessor\Proxy” does not exist

Leave a Reply

Your email address will not be published. Required fields are marked *

πŸš€ Let’s Connect on LinkedIn! πŸš€

Want to level up your skills and knowledge? πŸš€
Follow us on LinkedIn to get:
βœ… Expert insights on business growth
βœ… Daily tips to sharpen your skills
βœ… Exclusive updates from The Coach SMB

Let's grow together!