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:install
command,Β 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:
- Window + R and type regedit then enter
- Open this directory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4
- Right-click on the βImagePathβ and choose βModifyβ
- Change the Value Data field with your current installed path of apache in XAMPP
- In my case, the value is βC:\xampp\apache\bin\httpd.exeβ -k runservice
- For the question poster case, change the value to βc:\xampp\apache\bin\httpd.exeβ -k runservice
- 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 !!
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
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
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?
Hello Andriy,
Please run this command with sudo. At the beginning of the command, add sudo.
Thanks for posting.
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?
Run this command:
composer require symfony/console=4.4.26 and then run your command
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 π
For Windows Follow this: https://www.thecoachsmb.com/solved-forbidden-you-dont-have-permission-to-access-this-resource/
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
Hello shahzad
Run command by using sudo in the beginning of the command.
Thanks
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?
Keep Elasticsearch,apache and mysql running
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
in the install command add “–cleanup-database”
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
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
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)’
Follow the next, in the config.inc.php, we have set the password. so dont worry
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]
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
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
Hello lisbeth macias,
Please follow this article to fix that error.
Thanks,
Sonal
There are no commands defined in the “cache” namespace.
Thanks for contacting us rousvel ybdo.
Please follow below points:-
1. Give Permission to the project and
2. then run below command:-
php bin/magento cache:flush
Thanks,
Sonal
In Installer.php line 546:
Missing following extensions: βsodiumβ
However its already enable and restart xampp twice
can you please help me!
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
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
While installing composer, i think you have not selected the correct php.exe file path. Please re-install composer with the correct php.exe. Remember, php 8 is not supported by Magento2 yet.
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
The installation stopped here.
[Progress: 344 / 1442]
Module ‘Mageplaza_Smtp’:
Installing schema…
Can you please connect me on WhatsApp or Skype?
It looks like there is not enough memory. Please set the memory to 4GB.
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!
Please enable sodium extension from php.ini file
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!
Please enable sodium extension from php.ini file
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
Magento2 is not compatible with PHP8, you need to use PHP 7.4