[PHP-users 24652] Smartyが使えるようにならない

saito @ web2cad.jp saito @ web2cad.jp
2005年 2月 22日 (火) 12:06:39 JST


斉藤と申します。お願い致します。

環境
Linux Fedora core1+PHP version4.3.8+Apache2.0+PostgreSQL

Smartyを使えるようにしたいのですが、
下記のサイトと同じようにインストールして
http://sunset.freespace.jp/smarty/SmartyManual_2-6-5J_html/installing.smarty
.basic.html

php.iniのinclude_pathを自分用に
".:/usr/share/pear:/usr/share/pear/Smarty/libs"
に変えて

<?php
require('Smarty.class.php');
$smarty = new Smarty;
?>

これならエラーが出ないのですが、
ディレクトリを作って

"sample.tpl"
{* Smarty *}
Hello, {$name}!

"smarty.php"
<?php
require('Smarty.class.php');
$smarty = new Smarty;

$smarty->template_dir = '/var/www/html/templates/';
$smarty->compile_dir = '/var/www/html/templates_c/';
$smarty->config_dir = '/var/www/html/configs/';
$smarty->cache_dir = '/var/www/html/cache/';

$smarty->assign('name','Ned');

$smarty->display('sample.tpl');

?>
を追加すると下記のエラーが出ます。

Warning:
_get_plugin_filepath(/usr/share/pear/Smarty/libs/core/core.assemble_plugin_f
ilepath.php): failed to open stream: No such file or directory in
/usr/share/pear/Smarty/libs/Smarty.class.php on line 1359

Fatal error: _get_plugin_filepath(): Failed opening required
'/usr/share/pear/Smarty/libs/core/core.assemble_plugin_filepath.php'
(include_path='.:/usr/share/pear:/usr/share/pear/Smarty/libs') in
/usr/share/pear/Smarty/libs/Smarty.class.php on line 1359

最初はSmarty-2.6.7でやってみて、2.6.6で試しても同じエラーが出ます。

これがどういうことなのかわからないのでお願い致します。




PHP-users メーリングリストの案内