5

I am trying to run commands through ssh, but commands are not working. Please check the screenshot.

Enter image description here

6

This means the php not set as a Environment Variable.

So it must be tried with a full path with php:

/opt/lammp/bin/php

Reference

  • no such file or directory found ... prntscr.com/ky5ct1 – Magento Bug Sep 24 '18 at 15:43
  • @samairali it is example not the correct path you have to find yours. – PROGOSTECH Sep 24 '18 at 15:46
  • 1
    What do you mean by "global variable"? Isn't this about search paths? – Peter Mortensen Sep 24 '18 at 18:27
  • @PeterMortensen my mistake it is a Environment variable. added the reference. – PROGOSTECH Sep 25 '18 at 15:03
2

Run this in SSH:

which php

And then provide the full path e.g.:

/usr/bin/php bin/magento

Replace the /usr/bin/php with the result of which php command

  • This won't help. which just searches the path ... if php can be found on the path, then running it without the full path would work just fine. – Matthew Read Sep 24 '18 at 22:27
  • I had a same problem, and specifying the full path to the php worked. Like in the answer by @PROGOSTECH setting a php global variable solved the problem permanently. – Bare Feet Sep 25 '18 at 8:11

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.