cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Too many arguments, expected arguments command

Re: Error: Too many arguments, expected arguments command

1. I faced the same error message due to one space in parameter. 

2. Probably, you faced this issue due to 127.0.0.1 as bas-url. Magento 2 does not work on the top-level domains like localhost or 127.0.0.1. What happen if you would use any vhost?

Highlighted

Re: Error: Too many arguments, expected arguments command

This can be a problem with the SSH commandline.

Check if the command is correctly parsed by PHP.
Check if all quotes are correctly.
If you copy-past it from a website, the " " signs might be wrong.  Replace them on the command line.   Also check this with single quotes  ' '

Also check it with  single or double - (minus) signs.

Highlighted

Re: Error: Too many arguments, expected arguments command

Remove backslashes \ from the Magento install command line, for example I successfully ran the following command as root ....

 

./magento setup:install --base-url=http://localhost/magento2/ --db-host=localhost --db-name=mymagentodb --db-user=magentoadmin --db-password=magentopassword --admin-firstname=Magento --admin-lastname=Admin --admin-email=admin@example.com --admin-user=admin --admin-password=MySecretPassword --language=en_US --currency=CAD --timezone=America/Toronto --use-rewrites=1 --search-engine=elasticsearch7 --elasticsearch-host=servername.example.com --elasticsearch-port=9200