4. メンテナンス・トラブルシュート - PHP - 5.6 から 7.2 へ - smarty を忘れてた

 
4.1 smarty のアップグレード
4.2 /usr/local/etc/php.ini 編集

4.1 smarty のアップグレード

 ここでふと、WordPress は後でやるつもりであったが、smarty を忘れていたことに気づきました。

> portversion -v | grep smarty
[Reading data from pkg(8) ... - 248 packages found - done]
smarty3-php56-3.1.30        =  up-to-date with port

> portupgrade -o www/smarty3-php72 -f www/smarty3-php56
 とはいかんだろうなぁ。  clean して make し直しかしら・・・。

> cd /usr/ports/www/smarty3
> make clean
===>  Cleaning for smarty3-php72-3.1.30
===>  Cleaning for php56-5.6.36_1
===>  Cleaning for php56-5.6.36_1
===>  Cleaning for smarty3-php56-3.1.30
===>  Cleaning for smarty3-php70-3.1.30
===>  Cleaning for smarty3-php71-3.1.30
 なんか make clean の時点で期待が持てそうです。

> make
===>  License LGPL3 accepted by the user
===>   smarty3-php72-3.1.30 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by smarty3-php72-3.1.30 for building
===>  Extracting for smarty3-php72-3.1.30
=> SHA256 Checksum OK for smarty-php-smarty-v3.1.30_GH0.tar.gz.
===>  Patching for smarty3-php72-3.1.30
===>  Configuring for smarty3-php72-3.1.30
===>  Staging for smarty3-php72-3.1.30
===>   smarty3-php72-3.1.30 depends on file: /usr/local/include/php/main/php.h - found
===>   Generating temporary packing list
(cd /usr/ports/www/smarty3/work-php72/smarty-3.1.30/libs && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) &&  /usr/bin/find -Ed $1 $3 \(   -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} +  -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE . /usr/ports/www/smarty3/work-php72/stage/usr/local/share/smarty3-php72)
====> Compressing man pages (compress-man)

> make deinstall
===>  Deinstalling for smarty3-php72
===>   smarty3-php72 not installed, skipping

> make install
===>  Installing for smarty3-php72-3.1.30
===>  Checking if smarty3-php72 already installed
===>   Registering installation for smarty3-php72-3.1.30
Installing smarty3-php72-3.1.30...
You need to adjust php's include_path to contain `/usr/local/share/smarty3-php72'!
For example, insert
        include_path = ".:/usr/local/share/smarty3-php72"
into `/usr/local/etc/php.ini'.
 ん~、納得のいくメッセージです。

4.2 /usr/local/etc/php.ini 編集

 前項のメッセージに従い
/usr/local/etc/php.ini
 を編集します。

include_path = ".:/usr/local/share/smarty3-php56:/usr/local/share/phpmailer"
 を

include_path = ".:/usr/local/share/smarty3-php72:/usr/local/share/phpmailer"
 へ。