• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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