Run php via ssh

jasne

Verified User
Joined
Sep 28, 2011
Messages
52
Hello guys,

I can run command "php" via ssh, this runs default php version (8.1)
What if I have installed other (second) version ex. php 7.4 , how I can run this version via ssh ?
 
You have to specify the full path, i.e. /usr/local/phpXX/bin/php

For PHP 8.0 this would be:

/usr/local/php80/bin/php

For PHP 7.4 this would be:

/usr/local/php74/bin/php

Just change accordingly to whatever PHP version you want and what you have installed.
 
Back
Top