Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


centos_php8.1_upgrade

This is an old revision of the document!


CentOS PHP 8.1 Upgrade

Pre-existing PHP 7.4 RPMs:

[root@tidewater: ~]# rpm -qa |grep php | sort
oniguruma5php-6.9.7.1-1.el7.remi.x86_64
php-7.4.28-1.el7.remi.x86_64
php-cli-7.4.28-1.el7.remi.x86_64
php-common-7.4.28-1.el7.remi.x86_64
php-json-7.4.28-1.el7.remi.x86_64
php-mbstring-7.4.28-1.el7.remi.x86_64
php-mysqlnd-7.4.28-1.el7.remi.x86_64
php-pdo-7.4.28-1.el7.remi.x86_64
php-pecl-mcrypt-1.0.4-1.el7.remi.7.4.x86_64
php-sodium-7.4.28-1.el7.remi.x86_64
php-xml-7.4.28-1.el7.remi.x86_64

After installation, PHP files will now give this error message:

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in ...

Fix is explained at Stack Overflow and 2 options are the following:

  • use FILTER_UNSAFE_RAW
  • use FILTER_SANITIZE_FULL_SPECIAL_CHARS
centos_php8.1_upgrade.1646607829.txt.gz · Last modified: 2022/03/06 18:03 by juckins