I am trying to setup deployer php on a shared server. And having trouble running php remotely on the server.
The server is running php 7.0.6 for normal http requests. And if I SSH in via terminal and run php -v
on the remote server I get:
# php -v
PHP 7.0.6 (cli) (built: May 2 2016 02:11:49) ( NTS )
this seems good to go but if I run a remote command from my local machine:
$ ssh 'user@domain.com' 'php -v'
PHP 5.3.28 (cli) (built: Mar 29 2014 12:18:37)
obviously the remote command is not using the right php version. I found the version is set in the .bash_porfile
:
export PATH=/usr/local/lib/crucial-php/php-7.0.600/bin:$PATH
but I don't know how to get the ssh remote command to respect the .bash_profile
. Is there anyway to get the remote command to use the modified PATH without forcing it with source ~/.bash_profile