Table of contents
PHP 7.4.0 へアップデートしようとしたらエラー
- configure が通らない
- onigruma のライブラリがない -> libonig-dev をインストール
- make -j4 にしたらスワップメモリ不足
- スワップメモリを初期値の 100M から 1G に変更
- /etc/dphys-swapfile の CONF_SWAPSIZE を変更
CONF_SWAPSIZE=1024
- dphys-swapfile 再起動 (Ngnix, PHP などを止めたほうがよいと思う)
sudo sudo /etc/init.d/php7-fpm stop sudo /etc/init.d/nginx stop sudo systemctl stop dphys-swapfile sudo systemctl start dphys-swapfile sudo /etc/init.d/nginx stat sudo /etc/init.d/php7-fpm start
- /etc/dphys-swapfile の CONF_SWAPSIZE を変更
- スワップメモリを初期値の 100M から 1G に変更
- PHP 7.4.0 からではないと思うが、ZipArchive 拡張が有効になっていない
- どうやら libzip が PHP にバンドルされなくなったらしい
ラズパイの libzip だと動かないため、libzip を自前でビルドする必要があるらしいhttps://qiita.com/m3m0r7/items/7391593973c18d74c258- パラメータが "--enable-zip" から "--with-zip" に変更になったみたい(ラズパイの libzip で問題ない模様)
- ついでに webp 拡張を有効にする -> libwebp-dev をインストール
- 現在の configure
./configure \ --prefix=/usr/local/php7 \ --with-config-file-path=/etc/php7 \ --with-config-file-scan-dir=/etc/php7/conf.d \ --enable-mbstring \ --enable-bcmath \ --enable-pcntl \ --enable-ftp \ --enable-exif \ --enable-calendar \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --with-curl \ --with-iconv \ --with-gmp \ --with-pspell \ --enable-gd \ --with-webp \ --with-jpeg \ --with-zlib-dir=/usr \ --with-xpm \ --with-freetype \ --enable-gd-jis-conv \ --with-openssl \ --with-pdo-mysql=/usr \ --with-gettext=/usr \ --with-zip \ --with-zlib \ --with-bz2=/usr \ --with-mysqli=/usr/bin/mysql_config \ --enable-fpm
- だめだ・・・ make でコケる
php-src/ext/zip/php_zip.c:439: undefined reference to `zip_get_error' php-src/ext/zip/php_zip.c:440: undefined reference to `zip_error_code_system' php-src/ext/zip/php_zip.c:441: undefined reference to `zip_error_fini' ext/zip/.libs/php_zip.o: In function `php_zip_status': php-src/ext/zip/php_zip.c:421: undefined reference to `zip_get_error' php-src/ext/zip/php_zip.c:422: undefined reference to `zip_error_code_zip' php-src/ext/zip/php_zip.c:423: undefined reference to `zip_error_fini' ext/zip/.libs/php_zip.o: In function `c_ziparchive_setEncryptionName': php-src/ext/zip/php_zip.c:2234: undefined reference to `zip_file_set_encryption' ext/zip/.libs/php_zip.o: In function `c_ziparchive_getStatusString': php-src/ext/zip/php_zip.c:1587: undefined reference to `zip_get_error' php-src/ext/zip/php_zip.c:1588: undefined reference to `zip_error_strerror' php-src/ext/zip/php_zip.c:1589: undefined reference to `zip_error_fini' ext/zip/.libs/php_zip.o: In function `c_ziparchive_setEncryptionIndex': php-src/ext/zip/php_zip.c:2258: undefined reference to `zip_file_set_encryption' ext/zip/.libs/php_zip.o: In function `zm_info_zip': php-src/ext/zip/php_zip.c:3177: undefined reference to `zip_libzip_version' ext/zip/.libs/zip_stream.o: In function `php_zip_ops_read': php-src/ext/zip/zip_stream.c:63: undefined reference to `zip_file_get_error' php-src/ext/zip/zip_stream.c:65: undefined reference to `zip_error_strerror' php-src/ext/zip/zip_stream.c:66: undefined reference to `zip_error_fini' collect2: error: ld returned 1 exit status Makefile:290: recipe for target 'sapi/cli/php' failed make: *** [sapi/cli/php] Error 1
- 環境変数を設定してみた
export LIBZIP_CFLAGS="-I/usr/local/include" export LIBZIP_LIBS="-L/usr/local/lib"
- けどやはりだめなので、PECL 拡張で入れることにした
- せっかくなので最新版の libzip を使用してみる
wget https://libzip.org/download/libzip-1.5.2.tar.gz tar -zxvf libzip-1.5.2.tar.gz cd libzip-1.5.2 mkdir build cd build cmake .. make sudo make install
- PECL zip 拡張をインストール (今後の PHP バージョンアップ時には -f オプションをつける必要あり)
sudo /usr/local/php7/bin/pecl install -f zip
- /etc/php7/php.ini に extention=zip.so を追加
- せっかくなので最新版の libzip を使用してみる
- とりあえずはこれで解決。何か釈然としないけど。
Normalizer クラスを有効化
configure に "--enable-intl" を追加。
早速、エラーが出た。
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met: No package 'icu-uc' found No package 'icu-io' found No package 'icu-i18n' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables ICU_CFLAGS and ICU_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
apt-get install libicu-dev
でいけた。
XOOPS 関連修正分
- 済
Deprecated [PHP]: Function get_magic_quotes_gpc() is deprecated in file (trust)/class/hyp_common/hyp_common_func.php line 162 (1) - 済
Deprecated [PHP]: Function get_magic_quotes_gpc() is deprecated in file (trust)/modules/xpwiki/class/func/pukiwiki_func.php line 2231 (1)
userinfo.php
- Deprecated [PHP]: Non-static method MyfriendFunction::userinfo() should not be called statically in file (html)/core/XCube_Delegate.class.php line 349 (1)
- Deprecated [PHP]: Function get_magic_quotes_gpc() is deprecated in file (html)/core/XCube_HttpContext.class.php line 197 (1)
- Deprecated [PHP]: Non-static method XoopsModule::getByDirName() should not be called statically in file (html)/modules/xwords/include/search.inc.php line 32 (1)
- Warning [PHP]: count(): Parameter must be an array or an object that implements Countable in file (html)/modules/xwords/include/search.inc.php line 46 (1)
- Warning [PHP]: count(): Parameter must be an array or an object that implements Countable in file (trust)/modules/d3diary/search.php line 77 (1)
- Warning [PHP]: count(): Parameter must be an array or an object that implements Countable in file (html)/modules/rssc/include/search.inc.php line 67 (1)
- Warning [PHP]: count(): Parameter must be an array or an object that implements Countable in file (html)/modules/smartsection/class/item.php line 1679 (1)
- Warning [PHP]: count(): Parameter must be an array or an object that implements Countable in file (html)/modules/weblinks/include/search.inc.php line 75 (1)
- Deprecated [PHP]: implode(): Passing glue string after array is deprecated. Swap the parameters in file (trust)/modules/webphoto/class/inc/uri.php line 203 (2)
- Deprecated [PHP]: Non-static method MyTextSanitizer::getInstance() should not be called statically in file (html)/modules/xpress/include/search.php line 20 (1)
- Deprecated [PHP]: Non-static method exFrame::InjectionCheck() should not be called statically in file (html)/modules/exFrame/frameloader.php line 53 (1)
- Warning [PHP]: Declaration of XoopsSearchFilter::getCriteria(&$info) should be compatible with exAbstractFilterForm::getCriteria($start = 0, $limit = 0, $sort = 0) in file (html)/modules/exFrame/xoops/search.php line 173 (1)
- Warning [PHP]: Declaration of XoopsSearchFilter::getDefaultCriteria(&$info) should be compatible with exAbstractFilterForm::getDefaultCriteria($start = 0, $limit = 0) in file (html)/modules/exFrame/xoops/search.php line 183 (1)
- Warning [PHP]: Declaration of & exXoopsObjectHandler::get() should be compatible with & XoopsObjectHandler::get($int_id) in file (html)/modules/exFrame/xoops/object.php line 209 (1)
- Deprecated [PHP]: Non-static method exXoopsGroupPermHandler::getInstance() should not be called statically in file (html)/modules/yybbs/include/search.inc.php line 46 (1)
- Deprecated [PHP]: Function get_magic_quotes_gpc() is deprecated in file (html)/modules/exFrame/xoops/object.php line 100 (10)
- 墨
Deprecated [PHP]: join(): Passing glue string after array is deprecated. Swap the parameters in file (trust)/modules/xpwiki/search.php(13) : eval()'d code line 8 (1)
Counter: 216,
today: 2,
yesterday: 0
Last-modified: 2020-01-12 (Sun) 23:53:39 (JST) (379d) by web-master
新しくコメントをつける