6

I've just installed a fresh copy of Magento 2.1.2 from composer. I've previously installed Magento 2 in a different directory completely fine and the commands all run as they should. This has only happened since I installed a new repo to a different directory that the CLI for Magento started to not work.

I'm running Magento 2 with the following:

  • PHP 7.0.10
  • MySQL 5.6
  • Mac OS
  • MAMP Pro 4
  • Apache

I've tried:
Setting the correct permission
setting bin/magento file and folder to chmod executable.
chown to my_username:admmin

I have php setup perfectly fine in system $PATH. I've also noticed n98 does the same no errors/output just goes to a new line in the terminal.

If i run composer loads fine, if I run php -v loads php7 fine

I've been trying to fix this now for hours with no luck.

  • Command look like php bin/magento not bin/magento. – Suresh Chikani Oct 30 '16 at 18:24
  • 1
    Sorry yes the commands I've tried are: bin/magento cache:clean and php bin/magento cache:clean I've also tried running it with the full path to my php version also with no joy – TheOnlyOne Oct 30 '16 at 18:36
  • you have to add any error output or describe what happens if you execute bin/magento. It's impossible to solve the problem if you don't provide any information about the problem :P – David Verholen Jan 26 '17 at 17:43
0

First you have change the file permission for all files.

Example terminal comment: (file directory)

chmod -R 777 *

After change the permission you will execute the bin/magento comments.

clear cache:

php bin/magento cache:clean

php bin/magento cache:flush

Add template in pub/static file:

php -f bin/magento setup:static-content:deploy

In this comments execute in shop directory

Example:

cd /srv/www/magento2/htdocs

And execute the above mention comments. Refer the screen shot: enter image description here

  • Tried this and still the same, tried magerun and still noting I'm afraid – TheOnlyOne Oct 31 '16 at 8:52
0

Sorry for late reply to the answers given, however none of these worked for me, I believe the problem was using MAMP.

I've uninstalled and setup brew services and it's now running fine!

0

I had a similar issue and found a problem inside the PHP error log. One directory was missed inside the vendor directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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