1: 2019-11-29 (Fri) 15:31:44 nao-pon source Cur: 2020-01-12 (Sun) 23:53:39 web-master source
Line 1: Line 1:
* PHP 7.4.0 へアップデートしようとしたらエラー [#u023958f] * PHP 7.4.0 へアップデートしようとしたらエラー [#u023958f]
 +
 +&tag(PHP7.4,トラブル);
- configure が通らない - configure が通らない
Line 10: Line 12:
 sudo sudo /etc/init.d/php7-fpm stop  sudo sudo /etc/init.d/php7-fpm stop
 sudo /etc/init.d/nginx stop  sudo /etc/init.d/nginx stop
 + 
 sudo systemctl stop dphys-swapfile  sudo systemctl stop dphys-swapfile
 sudo systemctl start dphys-swapfile  sudo systemctl start dphys-swapfile
 + 
 sudo /etc/init.d/nginx stat  sudo /etc/init.d/nginx stat
 sudo /etc/init.d/php7-fpm start  sudo /etc/init.d/php7-fpm start
 +- PHP 7.4.0 からではないと思うが、ZipArchive 拡張が有効になっていない
 +-- どうやら libzip が PHP にバンドルされなくなったらしい
 +-- %%ラズパイの libzip だと動かないため、libzip を自前でビルドする必要があるらしい%%
 +-- %%[[https://qiita.com/m3m0r7/items/7391593973c18d74c258]]%%
 +-- パラメータが "--enable-zip" から "--with-zip" に変更になったみたい(ラズパイの libzip で問題ない模様)
 +- ついでに webp 拡張を有効にする -> libwebp-dev をインストール
 +- 現在の configure
 +#pre{{
 +./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 でコケる
 +#pre{{
 +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 を追加
 +- とりあえずはこれで解決。何か釈然としないけど。
 +
 +** [[Normalizer クラス:https://www.php.net/manual/ja/class.normalizer.php]]を有効化 [#d6f28510]
 +
 +configure に "--enable-intl" を追加。
 +
 +早速、エラーが出た。
 +
 +#pre{{
 +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 関連修正分 [#w1d03fb5]
 +
 +-''&font(Lime){済};'' %%Deprecated [PHP]: Function get_magic_quotes_gpc() is deprecated in file (trust)/class/hyp_common/hyp_common_func.php line 162 (1)%%
 +-''&font(Lime){済};'' %%Deprecated [PHP]: Function get_magic_quotes_gpc() is deprecated in file (trust)/modules/xpwiki/class/func/pukiwiki_func.php line 2231 (1)%%
 +
 +*** userinfo.php [#te7a6224]
 +-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)
 +-&font(Lime){''墨''};%%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)%%


Front page   Diff Backup Copy Reload   New Page Page list Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)
Counter: 158, today: 1, yesterday: 1