9.12.23

Installing and maintaining a specific PHP version release

If you require a specific PHP version and want it kept up to date, but not just receive the current release that gets updated when PHP new releases occur (for example the release of PHP 8.2 occurs when you want to stay on PHP 8.1) it is required that, when you install PHP and any modules, you only install version specific packages and not the generic packages. For example, most packages starting php- (e.g. php itself, and php-mbstring) are generic and will always default to the latest release, whereas selecting php8.1-cli, php8.1-fpm, php8.1-mbstring will install (and update) the specific 8.1 release (and in the case of PHP itself, the specific CLI, FPM, etc version of same).

Using this method will ensure that critical installs, e.g. to servers, are not suddenly replaced with a new version of PHP that may contain breaking changes or cause unexpected failures (e.g. a package not being available for your new release or an independent package that needs recompiling e.g. through PECL).

Also, this means that you do not need to try pinning PHP and that you are well set up to support multiple PHP versions on your system (e.g. to allow website installs to point to specific php-fpm versions).

Read the rest of this entry »

Posted in Debian, Linux | Comments Off on Installing and maintaining a specific PHP version release