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

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!

| improve this answer | |
0

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

| improve this answer | |
0
  1. Make sure you are in the root directory of your magento2 folder

    eg: pc-user@xxxx-xxxxx:/var/www/html/magento2$

  2. sometimes using php bin/magento will cause an error like this

    cache_dir "/var/www/html/magento2sample/var/cache/" is not writable So, try sudo bin/magento (sudo instead of php)

  3. try running this cammand also sudo chown -R www-data:www-data /var/www/html/magento2/

| improve this answer | |

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.