以前、php 7.3に更新しましたが、今回php 7.4に更新しました。
手順はほとんど同じです。
環境
・CentOS Linux release 7.9.2009 (Core)
・Kernel 3.10.0-1160.6.1.el7.x86_64
- remi-php74の有効化
- phpのアップデート
- opcacheのインストール
- /etc/php.d/10-opcache.iniの編集
- php74-php-pecl-apcuのインストール
- /etc/php.d/40-apcu.iniの編集
- php-pecl-imagickインストール
- /etc/php.d/30-imagick.iniの削除
- httpdの再起動
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# yum-config-manager --enable remi-php74 Loaded plugins: fastestmirror ==================================== repo: remi-php74 ==================================== [remi-php74] async = True bandwidth = 0 base_persistdir = /var/lib/yum/repos/x86_64/7 baseurl = cache = 0 cachedir = /var/cache/yum/x86_64/7/remi-php74 check_config_file_age = True compare_providers_priority = 80 cost = 1000 deltarpm_metadata_percentage = 100 deltarpm_percentage = enabled = 1 enablegroups = True exclude = failovermethod = priority ftp_disable_epsv = False gpgcadir = /var/lib/yum/repos/x86_64/7/remi-php74/gpgcadir gpgcakey = gpgcheck = True gpgdir = /var/lib/yum/repos/x86_64/7/remi-php74/gpgdir gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi hdrdir = /var/cache/yum/x86_64/7/remi-php74/headers http_caching = all includepkgs = ip_resolve = keepalive = True keepcache = False mddownloadpolicy = sqlite mdpolicy = group:small mediaid = metadata_expire = 21600 metadata_expire_filter = read-only:present metalink = minrate = 0 mirrorlist = http://cdn.remirepo.net/enterprise/7/php74/mirror mirrorlist_expire = 86400 name = Remi's PHP 7.4 RPM repository for Enterprise Linux 7 - x86_64 old_base_cache_dir = password = persistdir = /var/lib/yum/repos/x86_64/7/remi-php74 pkgdir = /var/cache/yum/x86_64/7/remi-php74/packages proxy = False proxy_dict = proxy_password = proxy_username = repo_gpgcheck = False retries = 10 skip_if_unavailable = False ssl_check_cert_permissions = True sslcacert = sslclientcert = sslclientkey = sslverify = True throttle = 0 timeout = 30.0 ui_id = remi-php74 ui_repoid_vars = releasever, basearch username = |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.riken.jp * epel: ftp.riken.jp * extras: ftp.riken.jp * remi: ftp.riken.jp * remi-php73: ftp.riken.jp * remi-php74: ftp.riken.jp * updates: ftp.riken.jp remi-php74 | 3.0 kB 00:00:00 remi-php74/primary_db | 224 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package php.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php.x86_64 0:7.4.13-1.el7.remi will be an update --> Processing Dependency: php-sodium(x86-64) = 7.4.13-1.el7.remi for package: php-7.4.13-1.el7.remi.x86_64 ---> Package php-cli.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-cli.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-common.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-common.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-devel.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-devel.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-fpm.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-fpm.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-gd.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-gd.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-json.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-json.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-mbstring.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-mbstring.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-mysqlnd.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-mysqlnd.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-pdo.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-pdo.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-pecl-zip.x86_64 0:1.19.2-1.el7.remi.7.3 will be updated ---> Package php-pecl-zip.x86_64 0:1.19.2-1.el7.remi.7.4 will be an update ---> Package php-process.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-process.x86_64 0:7.4.13-1.el7.remi will be an update ---> Package php-xml.x86_64 0:7.3.25-1.el7.remi will be updated ---> Package php-xml.x86_64 0:7.4.13-1.el7.remi will be an update --> Running transaction check ---> Package php-sodium.x86_64 0:7.4.13-1.el7.remi will be installed --> Processing Dependency: libsodium.so.23()(64bit) for package: php-sodium-7.4.13-1.el7.remi.x86_64 --> Running transaction check ---> Package libsodium.x86_64 0:1.0.18-1.el7.remi will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================== Package Arch Version Repository Size ========================================================================================== Updating: php x86_64 7.4.13-1.el7.remi remi-php74 3.4 M php-cli x86_64 7.4.13-1.el7.remi remi-php74 5.2 M php-common x86_64 7.4.13-1.el7.remi remi-php74 1.2 M php-devel x86_64 7.4.13-1.el7.remi remi-php74 1.2 M php-fpm x86_64 7.4.13-1.el7.remi remi-php74 1.8 M php-gd x86_64 7.4.13-1.el7.remi remi-php74 86 k php-json x86_64 7.4.13-1.el7.remi remi-php74 71 k php-mbstring x86_64 7.4.13-1.el7.remi remi-php74 523 k php-mysqlnd x86_64 7.4.13-1.el7.remi remi-php74 251 k php-pdo x86_64 7.4.13-1.el7.remi remi-php74 136 k php-pecl-zip x86_64 1.19.2-1.el7.remi.7.4 remi-php74 61 k php-process x86_64 7.4.13-1.el7.remi remi-php74 90 k php-xml x86_64 7.4.13-1.el7.remi remi-php74 206 k Installing for dependencies: libsodium x86_64 1.0.18-1.el7.remi remi 148 k php-sodium x86_64 7.4.13-1.el7.remi remi-php74 82 k Transaction Summary ========================================================================================== Install ( 2 Dependent packages) Upgrade 13 Packages Total download size: 14 M Is this ok [y/d/N]: y Downloading packages: No Presto metadata available for remi-php74 (1/15): libsodium-1.0.18-1.el7.remi.x86_64.rpm | 148 kB 00:00:00 (2/15): php-cli-7.4.13-1.el7.remi.x86_64.rpm | 5.2 MB 00:00:01 (3/15): php-gd-7.4.13-1.el7.remi.x86_64.rpm | 86 kB 00:00:00 (4/15): php-json-7.4.13-1.el7.remi.x86_64.rpm | 71 kB 00:00:00 (5/15): php-mbstring-7.4.13-1.el7.remi.x86_64.rpm | 523 kB 00:00:00 (6/15): php-mysqlnd-7.4.13-1.el7.remi.x86_64.rpm | 251 kB 00:00:00 (7/15): php-pdo-7.4.13-1.el7.remi.x86_64.rpm | 136 kB 00:00:00 (8/15): php-7.4.13-1.el7.remi.x86_64.rpm | 3.4 MB 00:00:02 (9/15): php-pecl-zip-1.19.2-1.el7.remi.7.4.x86_64.rpm | 61 kB 00:00:00 (10/15): php-sodium-7.4.13-1.el7.remi.x86_64.rpm | 82 kB 00:00:00 (11/15): php-process-7.4.13-1.el7.remi.x86_64.rpm | 90 kB 00:00:00 (12/15): php-xml-7.4.13-1.el7.remi.x86_64.rpm | 206 kB 00:00:00 (13/15): php-common-7.4.13-1.el7.remi.x86_64.rpm | 1.2 MB 00:00:04 (14/15): php-fpm-7.4.13-1.el7.remi.x86_64.rpm | 1.8 MB 00:00:04 (15/15): php-devel-7.4.13-1.el7.remi.x86_64.rpm | 1.2 MB 00:00:05 ------------------------------------------------------------------------------------------ Total 2.4 MB/s | 14 MB 00:00:06 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : php-json-7.4.13-1.el7.remi.x86_64 1/28 Updating : php-common-7.4.13-1.el7.remi.x86_64 2/28 warning: /etc/php.ini created as /etc/php.ini.rpmnew Updating : php-cli-7.4.13-1.el7.remi.x86_64 3/28 Updating : php-pdo-7.4.13-1.el7.remi.x86_64 4/28 Installing : libsodium-1.0.18-1.el7.remi.x86_64 5/28 Installing : php-sodium-7.4.13-1.el7.remi.x86_64 6/28 Updating : php-7.4.13-1.el7.remi.x86_64 7/28 Updating : php-mysqlnd-7.4.13-1.el7.remi.x86_64 8/28 Updating : php-devel-7.4.13-1.el7.remi.x86_64 9/28 Updating : php-mbstring-7.4.13-1.el7.remi.x86_64 10/28 Updating : php-gd-7.4.13-1.el7.remi.x86_64 11/28 Updating : php-xml-7.4.13-1.el7.remi.x86_64 12/28 Updating : php-pecl-zip-1.19.2-1.el7.remi.7.4.x86_64 13/28 Failed loading /opt/remi/php73/root/usr/lib64/php/modules/opcache.so: /opt/remi/php73/root/usr/lib64/php/modules/opcache.so: undefined symbol: zend_hash_index_exists PHP Warning: PHP Startup: Unable to load dynamic library 'posix' (tried: /usr/lib64/php/modules/posix (/usr/lib64/php/modules/posix: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/posix.so (/usr/lib64/php/modules/posix.so: undefined symbol: php_error_docref0)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'shmop' (tried: /usr/lib64/php/modules/shmop (/usr/lib64/php/modules/shmop: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/shmop.so (/usr/lib64/php/modules/shmop.so: undefined symbol: php_error_docref0)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'sysvmsg' (tried: /usr/lib64/php/modules/sysvmsg (/usr/lib64/php/modules/sysvmsg: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/sysvmsg.so (/usr/lib64/php/modules/sysvmsg.so: undefined symbol: php_error_docref0)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'sysvsem' (tried: /usr/lib64/php/modules/sysvsem (/usr/lib64/php/modules/sysvsem: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/sysvsem.so (/usr/lib64/php/modules/sysvsem.so: undefined symbol: php_error_docref0)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'sysvshm' (tried: /usr/lib64/php/modules/sysvshm (/usr/lib64/php/modules/sysvshm: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/sysvshm.so (/usr/lib64/php/modules/sysvshm.so: undefined symbol: php_error_docref0)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib64/php/modules/imagick.so (/usr/lib64/php/modules/imagick.so: undefined symbol: add_next_index_zval), /usr/lib64/php/modules/imagick.so.so (/usr/lib64/php/modules/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'wddx' (tried: /usr/lib64/php/modules/wddx (/usr/lib64/php/modules/wddx: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/wddx.so (/usr/lib64/php/modules/wddx.so: undefined symbol: php_error_docref0)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/opt/remi/php73/root/usr/lib64/php/modules/apcu.so' (tried: /opt/remi/php73/root/usr/lib64/php/modules/apcu.so (/opt/remi/php73/root/usr/lib64/php/modules/apcu.so: undefined symbol: zend_hash_index_exists), /usr/lib64/php/modules//opt/remi/php73/root/usr/lib64/php/modules/apcu.so.so (/usr/lib64/php/modules//opt/remi/php73/root/usr/lib64/php/modules/apcu.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Updating : php-process-7.4.13-1.el7.remi.x86_64 14/28 Updating : php-fpm-7.4.13-1.el7.remi.x86_64 15/28 Cleanup : php-7.3.25-1.el7.remi.x86_64 16/28 Cleanup : php-devel-7.3.25-1.el7.remi.x86_64 17/28 Cleanup : php-cli-7.3.25-1.el7.remi.x86_64 18/28 Cleanup : php-fpm-7.3.25-1.el7.remi.x86_64 19/28 Cleanup : php-process-7.3.25-1.el7.remi.x86_64 20/28 Cleanup : php-pecl-zip-1.19.2-1.el7.remi.7.3.x86_64 21/28 Cleanup : php-xml-7.3.25-1.el7.remi.x86_64 22/28 Cleanup : php-gd-7.3.25-1.el7.remi.x86_64 23/28 Cleanup : php-mysqlnd-7.3.25-1.el7.remi.x86_64 24/28 Cleanup : php-pdo-7.3.25-1.el7.remi.x86_64 25/28 Cleanup : php-mbstring-7.3.25-1.el7.remi.x86_64 26/28 Cleanup : php-json-7.3.25-1.el7.remi.x86_64 27/28 Cleanup : php-common-7.3.25-1.el7.remi.x86_64 28/28 Failed loading /opt/remi/php73/root/usr/lib64/php/modules/opcache.so: /opt/remi/php73/root/usr/lib64/php/modules/opcache.so: undefined symbol: zend_hash_index_exists PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib64/php/modules/imagick.so (/usr/lib64/php/modules/imagick.so: undefined symbol: add_next_index_zval), /usr/lib64/php/modules/imagick.so.so (/usr/lib64/php/modules/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/opt/remi/php73/root/usr/lib64/php/modules/apcu.so' (tried: /opt/remi/php73/root/usr/lib64/php/modules/apcu.so (/opt/remi/php73/root/usr/lib64/php/modules/apcu.so: undefined symbol: zend_hash_index_exists), /usr/lib64/php/modules//opt/remi/php73/root/usr/lib64/php/modules/apcu.so.so (/usr/lib64/php/modules//opt/remi/php73/root/usr/lib64/php/modules/apcu.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Verifying : php-mbstring-7.4.13-1.el7.remi.x86_64 1/28 Verifying : libsodium-1.0.18-1.el7.remi.x86_64 2/28 Verifying : php-pdo-7.4.13-1.el7.remi.x86_64 3/28 Verifying : php-7.4.13-1.el7.remi.x86_64 4/28 Verifying : php-mysqlnd-7.4.13-1.el7.remi.x86_64 5/28 Verifying : php-gd-7.4.13-1.el7.remi.x86_64 6/28 Verifying : php-xml-7.4.13-1.el7.remi.x86_64 7/28 Verifying : php-common-7.4.13-1.el7.remi.x86_64 8/28 Verifying : php-json-7.4.13-1.el7.remi.x86_64 9/28 Verifying : php-pecl-zip-1.19.2-1.el7.remi.7.4.x86_64 10/28 Verifying : php-process-7.4.13-1.el7.remi.x86_64 11/28 Verifying : php-devel-7.4.13-1.el7.remi.x86_64 12/28 Verifying : php-fpm-7.4.13-1.el7.remi.x86_64 13/28 Verifying : php-cli-7.4.13-1.el7.remi.x86_64 14/28 Verifying : php-sodium-7.4.13-1.el7.remi.x86_64 15/28 Verifying : php-fpm-7.3.25-1.el7.remi.x86_64 16/28 Verifying : php-gd-7.3.25-1.el7.remi.x86_64 17/28 Verifying : php-mysqlnd-7.3.25-1.el7.remi.x86_64 18/28 Verifying : php-process-7.3.25-1.el7.remi.x86_64 19/28 Verifying : php-mbstring-7.3.25-1.el7.remi.x86_64 20/28 Verifying : php-pdo-7.3.25-1.el7.remi.x86_64 21/28 Verifying : php-7.3.25-1.el7.remi.x86_64 22/28 Verifying : php-cli-7.3.25-1.el7.remi.x86_64 23/28 Verifying : php-json-7.3.25-1.el7.remi.x86_64 24/28 Verifying : php-common-7.3.25-1.el7.remi.x86_64 25/28 Verifying : php-xml-7.3.25-1.el7.remi.x86_64 26/28 Verifying : php-devel-7.3.25-1.el7.remi.x86_64 27/28 Verifying : php-pecl-zip-1.19.2-1.el7.remi.7.3.x86_64 28/28 Dependency Installed: libsodium.x86_64 0:1.0.18-1.el7.remi php-sodium.x86_64 0:7.4.13-1.el7.remi Updated: php.x86_64 0:7.4.13-1.el7.remi php-cli.x86_64 0:7.4.13-1.el7.remi php-common.x86_64 0:7.4.13-1.el7.remi php-devel.x86_64 0:7.4.13-1.el7.remi php-fpm.x86_64 0:7.4.13-1.el7.remi php-gd.x86_64 0:7.4.13-1.el7.remi php-json.x86_64 0:7.4.13-1.el7.remi php-mbstring.x86_64 0:7.4.13-1.el7.remi php-mysqlnd.x86_64 0:7.4.13-1.el7.remi php-pdo.x86_64 0:7.4.13-1.el7.remi php-pecl-zip.x86_64 0:1.19.2-1.el7.remi.7.4 php-process.x86_64 0:7.4.13-1.el7.remi php-xml.x86_64 0:7.4.13-1.el7.remi Complete! |
1 2 3 4 5 6 7 |
# php -v Failed loading /opt/remi/php73/root/usr/lib64/php/modules/opcache.so: /opt/remi/php73/root/usr/lib64/php/modules/opcache.so: undefined symbol: zend_hash_index_exists PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib64/php/modules/imagick.so (/usr/lib64/php/modules/imagick.so: undefined symbol: add_next_index_zval), /usr/lib64/php/modules/imagick.so.so (/usr/lib64/php/modules/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/opt/remi/php73/root/usr/lib64/php/modules/apcu.so' (tried: /opt/remi/php73/root/usr/lib64/php/modules/apcu.so (/opt/remi/php73/root/usr/lib64/php/modules/apcu.so: undefined symbol: zend_hash_index_exists), /usr/lib64/php/modules//opt/remi/php73/root/usr/lib64/php/modules/apcu.so.so (/usr/lib64/php/modules//opt/remi/php73/root/usr/lib64/php/modules/apcu.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# yum install php74-php-opcache Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.riken.jp * epel: ftp.riken.jp * extras: ftp.riken.jp * remi: ftp.riken.jp * remi-php73: ftp.riken.jp * remi-php74: ftp.riken.jp * updates: ftp.riken.jp Resolving Dependencies --> Running transaction check ---> Package php74-php-opcache.x86_64 0:7.4.13-2.el7.remi will be installed --> Processing Dependency: php74-php-common(x86-64) = 7.4.13-2.el7.remi for package: php74-php-opcache-7.4.13-2.el7.remi.x86_64 --> Running transaction check ---> Package php74-php-common.x86_64 0:7.4.13-2.el7.remi will be installed --> Processing Dependency: php74-php-json(x86-64) = 7.4.13-2.el7.remi for package: php74-php-common-7.4.13-2.el7.remi.x86_64 --> Processing Dependency: php74-runtime for package: php74-php-common-7.4.13-2.el7.remi.x86_64 --> Running transaction check ---> Package php74-php-json.x86_64 0:7.4.13-2.el7.remi will be installed ---> Package php74-runtime.x86_64 0:1.0-3.el7.remi will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================== Package Arch Version Repository Size ========================================================================================== Installing: php74-php-opcache x86_64 7.4.13-2.el7.remi remi 266 k Installing for dependencies: php74-php-common x86_64 7.4.13-2.el7.remi remi 689 k php74-php-json x86_64 7.4.13-2.el7.remi remi 74 k php74-runtime x86_64 1.0-3.el7.remi remi 1.1 M Transaction Summary ========================================================================================== Install 1 Package (+3 Dependent packages) Total download size: 2.1 M Installed size: 7.3 M Is this ok [y/d/N]: y Downloading packages: (1/4): php74-php-opcache-7.4.13-2.el7.remi.x86_64.rpm | 266 kB 00:00:00 (2/4): php74-php-json-7.4.13-2.el7.remi.x86_64.rpm | 74 kB 00:00:00 (3/4): php74-php-common-7.4.13-2.el7.remi.x86_64.rpm | 689 kB 00:00:01 (4/4): php74-runtime-1.0-3.el7.remi.x86_64.rpm | 1.1 MB 00:00:02 ------------------------------------------------------------------------------------------ Total 802 kB/s | 2.1 MB 00:00:02 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : php74-runtime-1.0-3.el7.remi.x86_64 1/4 Installing : php74-php-common-7.4.13-2.el7.remi.x86_64 2/4 Installing : php74-php-json-7.4.13-2.el7.remi.x86_64 3/4 Installing : php74-php-opcache-7.4.13-2.el7.remi.x86_64 4/4 Verifying : php74-php-opcache-7.4.13-2.el7.remi.x86_64 1/4 Verifying : php74-php-json-7.4.13-2.el7.remi.x86_64 2/4 Verifying : php74-php-common-7.4.13-2.el7.remi.x86_64 3/4 Verifying : php74-runtime-1.0-3.el7.remi.x86_64 4/4 Installed: php74-php-opcache.x86_64 0:7.4.13-2.el7.remi Dependency Installed: php74-php-common.x86_64 0:7.4.13-2.el7.remi php74-php-json.x86_64 0:7.4.13-2.el7.remi php74-runtime.x86_64 0:1.0-3.el7.remi Complete! |
/etc/php.d/10-opcache.iniに記述されているzend_extension=を変更します。
1 2 3 4 |
# vi /etc/php.d/10-opcache.ini ; Enable Zend OPcache extension module ;zend_extension=/opt/remi/php73/root/usr/lib64/php/modules/opcache.so zend_extension=/opt/remi/php74/root/usr/lib64/php/modules/opcache.so |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# yum install php74-php-pecl-apcu Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.riken.jp * epel: ftp.riken.jp * extras: ftp.riken.jp * remi: ftp.riken.jp * remi-php73: ftp.riken.jp * remi-php74: ftp.riken.jp * updates: ftp.riken.jp Resolving Dependencies --> Running transaction check ---> Package php74-php-pecl-apcu.x86_64 0:5.1.19-1.el7.remi will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================== Package Arch Version Repository Size ========================================================================================== Installing: php74-php-pecl-apcu x86_64 5.1.19-1.el7.remi remi 72 k Transaction Summary ========================================================================================== Install 1 Package Total download size: 72 k Installed size: 181 k Is this ok [y/d/N]: y Downloading packages: php74-php-pecl-apcu-5.1.19-1.el7.remi.x86_64.rpm | 72 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : php74-php-pecl-apcu-5.1.19-1.el7.remi.x86_64 1/1 Verifying : php74-php-pecl-apcu-5.1.19-1.el7.remi.x86_64 1/1 Installed: php74-php-pecl-apcu.x86_64 0:5.1.19-1.el7.remi Complete! |
/etc/php.d/40-apcu.iniに記述されているextension=を変更します。
1 2 3 4 |
# vi /etc/php.d/40-apcu.ini ; Enable APCu extension module ;extension = /opt/remi/php73/root/usr/lib64/php/modules/apcu.so extension = /opt/remi/php74/root/usr/lib64/php/modules/apcu.so |
Word`aress 5系に更新した時にremi repositoryからImageMagicをインストールしたのですがimagick.soでまだエラーがでています。
1 2 3 4 5 6 |
# php -v PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib64/php/modules/imagick.so (/usr/lib64/php/modules/imagick.so: undefined symbol: add_next_index_zval), /usr/lib64/php/modules/imagick.so.so (/usr/lib64/php/modules/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies |
ImageMagickをremove, reinstallしてみたのですが同じでしたのでphp-pecl-imagickをインストールしました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# yum install php-pecl-imagick Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.riken.jp * epel: ftp.riken.jp * extras: ftp.riken.jp * remi: ftp.riken.jp * remi-php73: ftp.riken.jp * remi-php74: ftp.riken.jp * updates: ftp.riken.jp Resolving Dependencies --> Running transaction check ---> Package php-pecl-imagick.x86_64 0:3.4.4-10.el7.remi.7.4 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================== Package Arch Version Repository Size ========================================================================================== Installing: php-pecl-imagick x86_64 3.4.4-10.el7.remi.7.4 remi-php74 176 k Transaction Summary ========================================================================================== Install 1 Package Total download size: 176 k Installed size: 962 k Is this ok [y/d/N]: y Downloading packages: php-pecl-imagick-3.4.4-10.el7.remi.7.4.x86_64.rpm | 176 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : php-pecl-imagick-3.4.4-10.el7.remi.7.4.x86_64 1/1 PHP Warning: Module 'imagick' already loaded in Unknown on line 0 PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Verifying : php-pecl-imagick-3.4.4-10.el7.remi.7.4.x86_64 1/1 Installed: php-pecl-imagick.x86_64 0:3.4.4-10.el7.remi.7.4 Complete! |
/etc/php.d/30-imagick.iniと/etc/php.d/40-imagick.iniで二重定義になっていたので/etc/php.d/30-imagick.iniを削除しました。
/etc/php.d/40-imagick.iniはphp-pecl-imagickのインストールで作成されていました。
/etc/php.d/30-imagick.iniはもしかしたら自分で作成したやつかな?忘れた
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# php -v PHP Warning: Module 'imagick' already loaded in Unknown on line 0 PHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies [root@ns WordPress]# grep imagic /etc/php.d/* /etc/php.d/30-imagick.ini:extension=imagick.so /etc/php.d/40-imagick.ini:; Enable imagick extension module /etc/php.d/40-imagick.ini:extension = imagick.so /etc/php.d/40-imagick.ini:; Documentation: http://php.net/imagick /etc/php.d/40-imagick.ini:imagick.skip_version_check=1 /etc/php.d/40-imagick.ini:;imagick.locale_fix=0 /etc/php.d/40-imagick.ini:;imagick.progress_monitor=0 # rm /etc/php.d/30-imagick.ini |
エラーは無くなりました。
1 2 3 4 5 |
# php -v PHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies |
1 |
# systemctl restart httpd |