cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Too many arguments, expected arguments command

Error: Too many arguments, expected arguments command

Hello,

I'm new to Magento and this is the first time trying to setup a test shop.

For this purpose I use a Ubunto 16.04 Image (Apache 2.4, PHP 7.0.25, MySQL 5.7.21) running on AWS.

I think, I did everything about prerequisites and pre-Installation Tasks very carefully.

Now I am at the Point of installing Magento 2.2.2.

I want to do this with the command line.

This is the command I use:

 

php magento setup:install --base-url="http://127.0.0.1/magento2/" --db-host="localhost" --db-name="magento" --db-user="magento" --db-password="magento" --admin-firstname="martin" –-admin-lastname="kaltenboeck" –-admin-user="admin" --admin-password="martin99" --admin-email="office@km-tools.at" -–language="de_AT" --currency="EUR" --timezone="Europe/Vienna" --cleanup-database --session-save="db" --use-rewrites="1"

 I get the following error message:

[Symfony\Component\Console\Exception\RuntimeException]
  Too many arguments, expected arguments "command".

I tried to enter the command as one line in the bash Shell.

 

I tried to put the command into a .sh-file and execute it with sh commandfile.sh

I tried to insert line breaks (backslash) to put every Argument in one line

I tried to use single, double and not quotes.

 

None of that works.

 

I found only a few Posts on the net dealing with that Problem, but could not find a solution over days.

 

Any help is appreciated! - Thanks in advance.

 

Regards,

Martin

5 REPLIES

Re: Error: Too many arguments, expected arguments command

Hi @martin_kaltenböck,

 

Can you see somehitng if you run this command?

 

php bin/magento --version

(You must be at the root directory of your store)

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Error: Too many arguments, expected arguments command

Thank your for the answer.

 

Yes, that works!

 

Tried some easy commands like

 

php magento --version

php magento list

php magento info:language:list

 

They all work!

 

I used to start the commands directly from the <installdir>/bin directory.

I now also tried to start it from <installdir> with php bin/magento <command> as you posted, but it makes no difference.

 

So what else could I try?

Re: Error: Too many arguments, expected arguments command

Have you tried running it from your browser? And does that result with the same error?

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this

Re: Error: Too many arguments, expected arguments command

Sorry, I'm not sure how to enter magento commands in a browser.

Do you mean something like this:

 

http://<myserver>/magento2/bin/magento?list

 

In this case the browser Shows:

#!/usr/bin/env php getMessage(); exit(1); } try { $handler = new \Magento\Framework\App\ErrorHandler(); set_error_handler([$handler, 'handler']); $application = new Magento\Framework\Console\Cli('Magento CLI'); $application->run(); } catch (\Exception $e) { while ($e) { echo $e->getMessage(); echo $e->getTraceAsString(); echo "\n\n"; $e = $e->getPrevious(); } exit(Magento\Framework\Console\Cli::RETURN_FAILURE); }

BR, Martin

 

Re: Error: Too many arguments, expected arguments command

I have the totally same problem

anything update?

Tags (1)