2

I have been trying for days to install Magento 2 on a Vagrant box running Ubuntu, Nginx & PHP 7.0.13

When I try to load the setup/installtion wizard I get a blank screen with no errors in the console or Nginx log

Setup page

Does anyone know what the correct steps are or what is causing this to happen?

If I try to install via php bin/magento setup:install

php bin/magento setup:install --base-url=http://magento.dev/ \
--backend-frontname=admin \
--db-host=localhost --db-name=magento2 --db-user=root --db-password=root \
--admin-firstname=Test --admin-lastname=Test—[email protected] \
--admin-user=admin --admin-password=password --language=en_GB \
--currency=GBP --timezone=Europe/London --use-rewrites=1

I get the following error

  [InvalidArgumentException]   
  Parameter validation failed  

If I try with the command on one line I get the same error:

php bin/magento setup:install --base-url=http://mage.dev --backend-frontname=admin --db-name=magento2 --db-user=root --db-password=magento2 --admin-firstname=Magento --admin-lastname=User [email protected] --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1

  [InvalidArgumentException]   
  Parameter validation failed 

What is this error and do I fix it? Why is it so difficult install Magento 2?

** UPDATE ** I've reinstalled from Magento 2 Repo Instead of using the .zip archive but now I get the following screen enter image description here

When I try to debug the request flow it looks to me like the classMap isn't getting the correct path when trying to autoload:

/home/vagrant/www/./vendor/autoload.php

11
  • Have you install on localhost on your pc or directly in server Commented Nov 25, 2016 at 11:36
  • I'm using vagrant, I have the files on the server and mounted on my mac Commented Nov 25, 2016 at 11:37
  • The vendor autoload looks wrong to me /home/vagrant/www/./vendor/autoload.php Commented Nov 25, 2016 at 11:39
  • try with, php bin/magento setup:install --base-url=http://<host or ip>/<your Magento install dir>/ --db-host=localhost --db-name=magento2 --db-user=root --db-password=magento2 --admin-firstname=Magento --admin-lastname=User [email protected] --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 Commented Nov 25, 2016 at 11:42
  • Doesn't work [InvalidArgumentException] Parameter validation failed I always get this error Commented Nov 25, 2016 at 11:43

5 Answers 5

3

I had the same issue, but try the following version of composer install:

php bin/magento setup:install --db-host=localhost --db-name=magento --db-user= --db-password= --backend-frontname= --admin-user= --admin-password= --admin-email= --admin-firstname= --admin-lastname= --base-url= --language=en_US --currency=USD --use-rewrites=1 --use-secure=0 --use-secure-admin=0 --cleanup-database

fill the information needed after the each = in the composer command, this worked for me

2
  • Hi same as below, ` [InvalidArgumentException] Parameter validation failed ` Commented Nov 17, 2016 at 10:46
  • 1
    Did you clone the magento2 repo or you downloaded the archive? If you cloned the repository be sure to run "composer install" before trying to install magento itself, after this your webinstaller should work. I installed magento2 for more than 10 times and worked as a charm
    – Vlad Patru
    Commented Nov 17, 2016 at 11:08
3
+25

When you downloaded from git I've found troubles with the master branch. Download the last stable version (2.2.2) branch instead and try that

1

I know Vagrant used to cause some issues when dealing with several lines as you can see from this commit: https://github.com/boostmyshoporganization/vagrant-magento2/commit/526119804cc175317771de4492c6974e3f4925a5

I suggest you run this command on one single line.

1
  • Did try that but get the same error ` [InvalidArgumentException] Parameter validation failed ` Commented Nov 17, 2016 at 10:42
1

Please ensure you have redirects enabled and allowed on nginx. You can add this by putting the following in your server block in the vhost:

<Directory /var/www/html/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
    </Directory>
3
  • Ehm... isn't this an apache directive? Commented Nov 29, 2016 at 16:59
  • You'd be right! My mistake! I think I was sat in Apache configs all that day! Commented Nov 29, 2016 at 20:13
  • On the plus side if the user decides to ditch nginx and go apache, he/she'll have an answer! Commented Nov 29, 2016 at 20:13
1

I believe that when installing Magento 2 on a nginx server you have to include the index.php to the URL:

http://www.domain.com/setup/index.php

I believe I've read somewhere that this is currently a bug in the installer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.