• 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.

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