ゼミサーバにもSmartyを導入しておく

pearに続いてSmartyも導入しておくことに。
まず、公式サイトからLatest Stable ReleaseのバージョンのSmarty-2.6.26.tar.gzを入手。
http://www.smarty.net/download.php
で解凍して、/usr/local/include/php/Smartyに場所を移動。

$ tar xvfz Smarty-2.6.26.tar.gz
$ mv Smarty-2.6.26 /usr/local/include/php/Smarty

そのあと、include_pathに追加するために、/etc/php.iniに以下を追記。

include_path=".:/usr/local/include/php"




※ついでにちょっと/etc/php.iniを編集

default_charset = "UTF-8"

mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = pass
mbstring.encoding_translation = Off
mbstring.detect_order = SJIS,EUC-JP,JIS,UTF-8,ASCII
mbstring.substitute_character = "none"

でリロードして

$ /etc/rc.d/init.d/httpd reload

phpinfo();で確認して、変更されていればOK。


参考