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

Enter image description here


This means the php not set as a Environment Variable.

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



| improve this answer | |
  • no such file or directory found ... prntscr.com/ky5ct1 – Flutterer 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

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

| improve this answer | |
  • 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. – Greg 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.