Помогите решить проблему запуска шаблонотизатора Smarty. Скрипт писал на другом сервере(Unix), там всё работало, перенёс на другой хостинг Агава, перестало работать, версия PHP 5.3.10
выдаёт такую ошибку:
подключаю через рассширение
\protected\extensions\Smarty\ESmartyViewRenderer.php
Код:
<?php
class ESmartyViewRenderer extends CApplicationComponent implements IViewRenderer {
public $fileExtension='.tpl';
public $filePermission=0755;
public $pluginsDir = null;
public $configDir = null;
private $smarty;
function init(){
define('SMARTY_SPL_AUTOLOAD', 1);
Yii::import('application.vendors.*');
require_once('Smarty-3.1.8/libs/Smarty.class.php');
$this->smarty = new Smarty();
$this->smarty->error_reporting = E_ALL & ~E_NOTICE;
$this->smarty->template_dir = array ( Yii::getPathOfAlias('webroot').'/themes/'.Yii::app()->theme->name.'/' );
$compileDir = Yii::app()->getRuntimePath().'/smarty/compiled/';
if(!file_exists($compileDir)){
mkdir($compileDir, $this->filePermission, true);
}
$this->smarty->compile_dir = $compileDir;
if(!empty($this->pluginsDir)){
$this->smarty->addPluginsDir(Yii::getPathOfAlias('application.extensions.Smarty.plugins'));
}
$dbStats = Yii::app()->db->getStats();
$this->smarty->assign(array(
"MEMORY" => round(Yii::getLogger()->memoryUsage/1024/1024, 3),
"TIME" => round(Yii::getLogger()->executionTime, 3),
"dbCount" => $dbStats[0],
"dbTime" => round($dbStats[1], 5),
));
}
public function renderFile($context,$sourceFile,$data,$return) {
$data['this'] = $context;
if(!is_file($sourceFile) || ($file=realpath($sourceFile))===false)
throw new CException(Yii::t('yiiext','View file "{file}" does not exist.', array('{file}'=>$sourceFile)));
$this->smarty->assign($data);
return $this->smarty->fetch($sourceFile);
}
}
я так понимаю фреймворк пытается подключить файл Smarty_Internal_TemplateCompilerBase.php из названия класса, но такого файла не существует, есть в нижнем регистре smarty_internal_templatebase.php