Switching PHP-FPM and PHP-CLI versions is possible with the jrctl tool. The PHP-FPM version is the version used by the website application like Magento. The PHP-CLI is the version used from the command line for interactive commands or the cron entries.
PHP-FPM
Viewing Available PHP-FPM Versions
$ jrctl website php-available
Filtering nodes that match tag(s): default
VERSION INSTALLED ENABLED CONFIGURED AVAILABLE
php-fpm-7.1 ✔ ✔ No
php-fpm-5.6 ✔ ✔ No
php-fpm-7.2 ✔ ✔ No
php-fpm-7.0 ✔ ✔ No
php-fpm-7.3 ✔ ✔ No
php-fpm-8.3 ✔ ✔ ✔ Yes
php-fpm-7.4 ✔ ✔ ✔ Yes
php-fpm-8.1 ✔ ✔ ✔ Yes
Viewing Available Websites to Switch
$ jrctl website list
Filtering nodes that match tag(s): default
HOSTNAME SERVER TAG(S) RESPONSE
c127gk7-pat-vm.jetrails.io 127.0.0.1 c127gk7, jump, default, www, db, redis, queue, search, varnish found 1 website(s)
NAME COMPATIBLE PHP-FPM VERSION
example.com Yes php-fpm-8.1
Switching Website Version
$ jrctl website php-switch example.com php-fpm-8.1
Filtering nodes that match tag(s): default
STATUS MESSAGE
OK (200) successfully switched "example.com" to use "php-fpm-8.1"
PHP Command Line Version
Viewing Available PHP-CLI Versions
$ jrctl alternative list
WARNING: if you are trying to change php-fpm versions, checkout `jrctl website --help` instead.
Filtering nodes that match tag(s): default
HOSTNAME SERVER TAG(S) RESPONSE
c127gk7-pat-vm.jetrails.io 127.0.0.1 c125g, jump, default, www, db, redis, queue, search, varnish found 1 program(s)
HOSTNAME PROGRAM CURRENT VERSION AVAILABLE VERSIONS
c127gk7-pat-vm.jetrails.io php-cli php-cli-8.1 /usr/bin/php.default, php-cli-5.6, php-cli-7.0, php-cli-7.1, php-cli-7.2, php-cli-7.3, php-cli-7.4, php-cli-8.0, php-cli-8.1, php-cli-8.2, php-cli-8.3, php-cli-8.4
Switching PHP-CLI Version
$ jrctl alternative switch php-cli -v php-cli-8.1
Filtering nodes that match tag(s): default
HOSTNAME SERVER TAG(S) RESPONSE
c127gk7-pat-vm.jetrails.io 127.0.0.1 c127gk7, jump, default, www, db, redis, queue, search, varnish successfully switched to "php-cli-8.1"
Comments
0 comments
Article is closed for comments.