• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

PHP Version in SSH Connections

SunnyFrimley

New Pleskian
Hello

I run a number of domains on my server, and using Plesk they are configured to use PHP 7.

If I use Putty to SSH to the server, and log in as root, or as an account set up for the particular domain, and then type:

php -ver

It says I am using PHP Ver 5.4.

Using the SSH console within Plesk was a non starter, as it requires Java.

Now, rather than just update this on the command line, and potentially bugger up my Plesk back end, I thought I would ask here if there was a way to connect via SSH and get the environment that my domain gets.

Technical Info:

OS: ‪CentOS 6.5 (Final)‬
Plesk version: 12.5.30 Update #28, last updated at April 14, 2016 01:20 PM

The reason I want this is because I want to run Artisan command line commands for Laravel. I can do that via a web page but it would be a lot easier to do it via Putty.

Ta
 
Path to PHP7 on your Plesk server is:

# /opt/plesk/php/7.0/bin/php -v
PHP 7.0.5 (cli) (built: Apr 15 2016 12:50:44) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
 
@IgorG i have this same problem. want to use composer and artisan commands. there is not option to install composer in Applications.
after login via ssh it shows php 5.4
 
Hi ahmadali,

after login via ssh it shows php 5.4

Pls. note, that it is essential to know, that EACH PHP - version has it's very own path:

Examples:
Code:
/opt/plesk/php/5.2/bin/php
/opt/plesk/php/5.3/bin/php
/opt/plesk/php/5.4/bin/php
/opt/plesk/php/5.5/bin/php
/opt/plesk/php/5.6/bin/php
/opt/plesk/php/7.0/bin/php
/opt/plesk/php/7.1/bin/php

.. while your vendor PHP - executable is located at "/usr/bin/php".


If you need further help, pls. provide as well YOUR used commands and the outputs from YOUR command line, so that people willing to help you have something to start with their investigatons and they are then able to suggest possible solutions/suggestions/work-arounds. :)
 
Back
Top