• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Question PHP Version and Laravel

Adrz

New Pleskian
I have a problem when I go to install the framework laravel, need PHP version 5.4 or higher. SSH always shows PHP 5.3.3.

In PLESK I configured the hosting with the latest version of PHP, but SHH always show PHP 5.3.3.

I need to use PHP5 + to use laravel.

PD: attached a screenshot
8PXmpc6.png


Terminal
-----------------------
[root@XXXXX ~]# php -v
PHP 5.3.3 (cli) (built: Aug 11 2016 20:33:53)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.6.0, Copyright (c) 2002-2014, by ionCube Ltd.
---------------------------
 
Hi Adrz,

your used command, to control your PHP version is ONLY for your vendor PHP version and not for the Plesk - PHP - versions. Each PHP - version has its own binaries:

Code:
/opt/plesk/php/5.2/bin/php -v
/opt/plesk/php/5.3/bin/php -v
/opt/plesk/php/5.4/bin/php -v
/opt/plesk/php/5.5/bin/php -v
/opt/plesk/php/5.6/bin/php -v
/opt/plesk/php/7.0/bin/php -v

Code:
/opt/plesk/php/5.2/bin/php -m
/opt/plesk/php/5.3/bin/php -m
/opt/plesk/php/5.4/bin/php -m
/opt/plesk/php/5.5/bin/php -m
/opt/plesk/php/5.6/bin/php -m
/opt/plesk/php/7.0/bin/php -m

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


Pls. use for example a file with the content:

Code:
<?php
phpinfo();
?>
... and place this file in your docroot of your domain ( example: "/var/www/vhosts/YOUR-DOMAIN.COM/httpdocs/phpinfo.php" or for a subdomain: "/var/www/vhosts/YOUR-DOMAIN/SUB-DOMAIN.YOUR-DOMAIN.COM/phpinfo.php" ). Now open your newly created page and check the used PHP version:

 
That's right, my phpinfo.php displays version 6.5.24.
However when I run the installer on the same root gives me the following message:

guzzlehttp / guzzle 6.2.0 requires PHP> = 5.5.0 -> your PHP version (5.3.3) does not Satisfy That requirement.
 
Composer runs php as a console command. You must tell the console to start PHP 5.6 or higher to be able to install this program. Try this workaround:

1) Login to your server by SSH.
2) # su
3) In your /home/[username] directory edit .bashrc and add this line as the last line:
alias php="/opt/plesk/php/5.6/bin/php"
4) Save the file.
5) # source .bashrc

Run "php -v" to verify that the "php" command will now execute the 5.6 version for your user.

Same works for 7.0 like this:
alias php="/opt/plesk/php/7.0/bin/php"

This will not change the default vendor PHP on the machine, it will only trick the file system into looking for "php" at a different location if your user is logged in to the shell.
 
Back
Top