


先月、当サイトをphp 5.4から5.6にアップデートしました。
php 7でサイト高速化の記事を見るとアップデートしたくなりました。
CentOS6にPHP7を導入してWordPressを高速化する
https://www.riscascape.net/archives/4303
WordPress 4.4以降であればphp 7でも大丈夫そうなので一気にアップデートです(^^;
- remi-php70の有効化
- phpのアップデート
- パージョンの確認
- php 5.6をアンインストール
- remi-php56.repoを無効化
今後の保守もあるのでremi-php70を有効化しておきます。
1 |
# yum-config-manager --enable remi-php70 |
ちょっと長いですがそのまま載せます。途中で「ライブラリが読み込めない」とのエラーになってますが取り敢えず終わりました(^^;;
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 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# yum update 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * epel: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * remi: mirrors.mediatemple.net * remi-php56: mirrors.mediatemple.net * remi-php70: mirrors.mediatemple.net * updates: ftp.iij.ad.jp 依存性の解決をしています --> トランザクションの確認を実行しています。 ---> パッケージ php.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php.x86_64 0:7.0.8-1.el7.remi を アップデート ---> パッケージ php-cli.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php-cli.x86_64 0:7.0.8-1.el7.remi を アップデート ---> パッケージ php-common.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php-common.x86_64 0:7.0.8-1.el7.remi を アップデート ---> パッケージ php-devel.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php-devel.x86_64 0:7.0.8-1.el7.remi を 非推奨 ---> パッケージ php-gd.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php-gd.x86_64 0:7.0.8-1.el7.remi を アップデート ---> パッケージ php-json.x86_64 0:7.0.8-1.el7.remi を 非推奨 ---> パッケージ php-mbstring.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php-mbstring.x86_64 0:7.0.8-1.el7.remi を アップデート ---> パッケージ php-mysqlnd.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php-mysqlnd.x86_64 0:7.0.8-1.el7.remi を アップデート ---> パッケージ php-pdo.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php-pdo.x86_64 0:7.0.8-1.el7.remi を アップデート ---> パッケージ php-pecl-jsonc.x86_64 0:1.3.10-1.el7.remi.5.6 を 不要 ---> パッケージ php-pecl-jsonc-devel.x86_64 0:1.3.10-1.el7.remi.5.6 を 不要 ---> パッケージ php-pecl-zip.x86_64 0:1.13.3-1.el7.remi.5.6 を 更新 ---> パッケージ php-pecl-zip.x86_64 0:1.13.3-1.el7.remi.7.0 を アップデート ---> パッケージ php-process.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php-process.x86_64 0:7.0.8-1.el7.remi を アップデート ---> パッケージ php-xml.x86_64 0:5.6.23-1.el7.remi を 更新 ---> パッケージ php-xml.x86_64 0:7.0.8-1.el7.remi を アップデート --> 依存性解決を終了しました。 依存性を解決しました =========================================================================================== Package アーキテクチャー バージョン リポジトリー =========================================================================================== インストール中: php-devel x86_64 7.0.8-1.el7.remi remi-php70 php-pecl-jsonc-devel.x86_64 1.3.10-1.el7.remi.5.6 を入れ替えます php-json x86_64 7.0.8-1.el7.remi remi-php70 php-pecl-jsonc.x86_64 1.3.10-1.el7.remi.5.6 を入れ替えます 更新します: php x86_64 7.0.8-1.el7.remi remi-php70 php-cli x86_64 7.0.8-1.el7.remi remi-php70 php-common x86_64 7.0.8-1.el7.remi remi-php70 php-gd x86_64 7.0.8-1.el7.remi remi-php70 php-mbstring x86_64 7.0.8-1.el7.remi remi-php70 php-mysqlnd x86_64 7.0.8-1.el7.remi remi-php70 php-pdo x86_64 7.0.8-1.el7.remi remi-php70 php-pecl-zip x86_64 1.13.3-1.el7.remi.7.0 remi-php70 php-process x86_64 7.0.8-1.el7.remi remi-php70 php-xml x86_64 7.0.8-1.el7.remi remi-php70 トランザクションの要約 =========================================================================================== インストール 2 パッケージ 更新 10 パッケージ 総ダウンロード容量: 9.8 M Is this ok [y/d/N]: y Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/12): php-devel-7.0.8-1.el7.remi.x86_64.rpm | 1.0 MB (2/12): php-json-7.0.8-1.el7.remi.x86_64.rpm | 53 kB (3/12): php-gd-7.0.8-1.el7.remi.x86_64.rpm | 67 kB (4/12): php-mbstring-7.0.8-1.el7.remi.x86_64.rpm | 566 kB (5/12): php-cli-7.0.8-1.el7.remi.x86_64.rpm | 3.9 MB (6/12): php-pdo-7.0.8-1.el7.remi.x86_64.rpm | 115 kB (7/12): php-process-7.0.8-1.el7.remi.x86_64.rpm | 72 kB (8/12): php-xml-7.0.8-1.el7.remi.x86_64.rpm | 200 kB (9/12): php-pecl-zip-1.13.3-1.el7.remi.7.0.x86_64.rpm | 50 kB (10/12): php-mysqlnd-7.0.8-1.el7.remi.x86_64.rpm | 229 kB (11/12): php-common-7.0.8-1.el7.remi.x86_64.rpm | 995 kB (12/12): php-7.0.8-1.el7.remi.x86_64.rpm | 2.6 MB ------------------------------------------------------------------------------------------- 合計 877 kB/s | 9.8 MB Running transaction check Running transaction test Transaction test succeeded Running transaction インストール中 : php-json-7.0.8-1.el7.remi.x86_64 WARNING : These php-* RPMs are not official Fedora / Red Hat build and overrides the official ones. Don't file bugs on Fedora Project nor Red Hat. Use dedicated forum at http://forum.remirepo.net/ 更新します : php-common-7.0.8-1.el7.remi.x86_64 warning: /etc/php.ini created as /etc/php.ini.rpmnew 更新します : php-cli-7.0.8-1.el7.remi.x86_64 更新します : php-pdo-7.0.8-1.el7.remi.x86_64 更新します : php-mysqlnd-7.0.8-1.el7.remi.x86_64 更新します : php-7.0.8-1.el7.remi.x86_64 インストール中 : php-devel-7.0.8-1.el7.remi.x86_64 更新します : php-pecl-zip-1.13.3-1.el7.remi.7.0.x86_64 Failed loading /opt/remi/php56/root/usr/lib64/php/modules/opcache.so: /opt/remi/php56/rootmodules/opcache.so: undefined symbol: zend_opcode_handlers PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/dom.so' -/modules/dom.so: undefined symbol: zval_used_for_init in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/gd.so' - modules/gd.so: undefined symbol: _zend_list_find in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mbstring.4/php/modules/mbstring.so: undefined symbol: zend_hash_del_key_or_index in Unknown on line PHP Warning: PHP Startup: posix: Unable to initialize module Module compiled with module API=20131226 PHP compiled with module API=20151012 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/shmop.so'hp/modules/shmop.so: undefined symbol: _zend_list_find in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/simplexml64/php/modules/simplexml.so: undefined symbol: zval_used_for_init in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sysvmsg.s/php/modules/sysvmsg.so: undefined symbol: gc_remove_zval_from_buffer in Unknown on line 0 PHP Warning: PHP Startup: sysvsem: Unable to initialize module Module compiled with module API=20131226 PHP compiled with module API=20151012 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sysvshm.s/php/modules/sysvshm.so: undefined symbol: _zend_list_delete in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/xml.so' -/modules/xml.so: undefined symbol: _zend_hash_index_update_or_next_insert in Unknown on lin PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/xmlwriter64/php/modules/xmlwriter.so: undefined symbol: zend_object_store_get_object in Unknown on l PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/xsl.so' -/modules/xsl.so: undefined symbol: dom_node_class_entry in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so'hp/modules/mysql.so: undefined symbol: _zend_list_find in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/wddx.so' p/modules/wddx.so: undefined symbol: _zend_hash_index_update_or_next_insert in Unknown on l PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/xmlreader64/php/modules/xmlreader.so: undefined symbol: dom_node_class_entry in Unknown on line 0 PHP Warning: Module 'json' already loaded in Unknown on line 0 PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: honorsbaseinstall in /usr/share/pear/PEAR/Installer/Role.php PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: installable in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: phpfile in /usr/share/pear/PEAR/Installer/Role.php on line 20 PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Notice: Undefined index: config_vars in /usr/share/pear/PEAR/Installer/Role.php on lin PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o PHP Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php o 更新します : php-xml-7.0.8-1.el7.remi.x86_64 更新します : php-gd-7.0.8-1.el7.remi.x86_64 更新します : php-process-7.0.8-1.el7.remi.x86_64 更新します : php-mbstring-7.0.8-1.el7.remi.x86_64 削除中 : php-pecl-jsonc-devel-1.3.10-1.el7.remi.5.6.x86_64 整理中 : php-devel-5.6.23-1.el7.remi.x86_64 整理中 : php-5.6.23-1.el7.remi.x86_64 整理中 : php-cli-5.6.23-1.el7.remi.x86_64 整理中 : php-mbstring-5.6.23-1.el7.remi.x86_64 整理中 : php-process-5.6.23-1.el7.remi.x86_64 整理中 : php-mysqlnd-5.6.23-1.el7.remi.x86_64 整理中 : php-pdo-5.6.23-1.el7.remi.x86_64 整理中 : php-gd-5.6.23-1.el7.remi.x86_64 整理中 : php-xml-5.6.23-1.el7.remi.x86_64 削除中 : php-pecl-jsonc-1.3.10-1.el7.remi.5.6.x86_64 Failed loading /opt/remi/php56/root/usr/lib64/php/modules/opcache.so: /opt/remi/php56/rootmodules/opcache.so: undefined symbol: zend_opcode_handlers 整理中 : php-common-5.6.23-1.el7.remi.x86_64 整理中 : php-pecl-zip-1.13.3-1.el7.remi.5.6.x86_64 Failed loading /opt/remi/php56/root/usr/lib64/php/modules/opcache.so: /opt/remi/php56/rootmodules/opcache.so: undefined symbol: zend_opcode_handlers 検証中 : php-pecl-zip-1.13.3-1.el7.remi.7.0.x86_64 検証中 : php-7.0.8-1.el7.remi.x86_64 検証中 : php-xml-7.0.8-1.el7.remi.x86_64 検証中 : php-gd-7.0.8-1.el7.remi.x86_64 検証中 : php-pdo-7.0.8-1.el7.remi.x86_64 検証中 : php-common-7.0.8-1.el7.remi.x86_64 検証中 : php-json-7.0.8-1.el7.remi.x86_64 検証中 : php-mysqlnd-7.0.8-1.el7.remi.x86_64 検証中 : php-cli-7.0.8-1.el7.remi.x86_64 検証中 : php-process-7.0.8-1.el7.remi.x86_64 検証中 : php-mbstring-7.0.8-1.el7.remi.x86_64 検証中 : php-devel-7.0.8-1.el7.remi.x86_64 検証中 : php-xml-5.6.23-1.el7.remi.x86_64 検証中 : php-pecl-zip-1.13.3-1.el7.remi.5.6.x86_64 検証中 : php-pecl-jsonc-devel-1.3.10-1.el7.remi.5.6.x86_64 検証中 : php-pecl-jsonc-1.3.10-1.el7.remi.5.6.x86_64 検証中 : php-cli-5.6.23-1.el7.remi.x86_64 検証中 : php-common-5.6.23-1.el7.remi.x86_64 検証中 : php-pdo-5.6.23-1.el7.remi.x86_64 検証中 : php-process-5.6.23-1.el7.remi.x86_64 検証中 : php-mysqlnd-5.6.23-1.el7.remi.x86_64 検証中 : php-5.6.23-1.el7.remi.x86_64 検証中 : php-gd-5.6.23-1.el7.remi.x86_64 検証中 : php-mbstring-5.6.23-1.el7.remi.x86_64 検証中 : php-devel-5.6.23-1.el7.remi.x86_64 インストール: php-devel.x86_64 0:7.0.8-1.el7.remi php-json.x86_64 0:7.0.8-1.el7.remi 更新: php.x86_64 0:7.0.8-1.el7.remi php-cli.x86_64 0:7.0.8-1.el7.remi php-common.x86_64 0:7.0.8-1.el7.remi php-gd.x86_64 0:7.0.8-1.el7.remi php-mbstring.x86_64 0:7.0.8-1.el7.remi php-mysqlnd.x86_64 0:7.0.8-1.el7.remi php-pdo.x86_64 0:7.0.8-1.el7.remi php-pecl-zip.x86_64 0:1.13.3-1.el7.remi php-process.x86_64 0:7.0.8-1.el7.remi php-xml.x86_64 0:7.0.8-1.el7.remi 置換: php-pecl-jsonc.x86_64 0:1.3.10-1.el7.remi.5.6 php-pecl-jsonc-devel.x86_64 0:1.3.10-1.e 完了しました! |
opcache.soでエラーになっていますが、バージョンは7.0.8に上がりました。
1 2 3 4 5 |
# php -v Failed loading /opt/remi/php56/root/usr/lib64/php/modules/opcache.so: /opt/remi/php56/rootmodules/opcache.so: undefined symbol: zend_opcode_handlers PHP 7.0.8 (cli) (built: Jun 22 2016 11:57:34) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies |
php 5.6をアンインストールします。
1 |
# yum remove php56-* |
remi-php56.repoを無効化します。
1 |
# yum-config-manager --disable remi-php56 |