• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • 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 Composer and default PHP version

NateWon

Basic Pleskian
Server operating system version
Ubuntu 20.04.6 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.67_build1800250217.08
I'm having some issues with the version of PHP composer is running on.
php -v - shows 7.0.3

Which ultimately isn't needed (Currently its enabled because Magento is faster on that version of PHP than 7.1????).
So PHP 7.0 could be removed (Currently the site only supports 7.0 or 7.1).
However I need a specific version 7.2.5 to update a Magento project. (Composer requires one version, and Magento another)
I can install that easily enough, but need to know how to set the default PHP version ideally for composer.

I assume this would work without issue.
Code:
$ sudo a2dismod php7.0
$ sudo a2enmod php7.2
$ sudo service apache2 restart
$ sudo update-alternatives --set php /usr/bin/php7.2
$ sudo update-alternatives --set phar /usr/bin/phar7.2
$ sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.2

However the only PHP versions I can see at /usr/bin are custom installations I have made, rather than the plesk PHP versions.
Which once the update is complete, I'd like to remove the 7.2 version and set to either the default or a more recent version 8.1/8.3.

- Where do I locate the PHP versions installed from Plesk - and set one of those to the default PHP version (php -v)
- Is there another way to force composer to use a specific version of PHP for the entire server, or just the current directory?
 
Back
Top