include(Smarty_Internal_TemplateCompilerBase.php) ... No such file or directory

Помогите решить проблему запуска шаблонотизатора Smarty. Скрипт писал на другом сервере(Unix), там всё работало, перенёс на другой хостинг Агава, перестало работать, версия PHP 5.3.10

выдаёт такую ошибку:

http://clip2net.com/s/1T5Qd

подключаю через рассширение

\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

всё, разобрался, всем спасибо, заменил код


		define('SMARTY_SPL_AUTOLOAD', 1);


		Yii::import('application.vendors.*');

		require_once('Smarty-3.1.8/libs/Smarty.class.php');



на этот


				Yii::import('application.vendors.*');


				// need this to avoid Smarty rely on spl autoload function,

				// this has to be done since we need the Yii autoload handler

				if (!defined('SMARTY_SPL_AUTOLOAD')) {

					define('SMARTY_SPL_AUTOLOAD', 0);

				} elseif (SMARTY_SPL_AUTOLOAD !== 0) {

						throw new CException('ESmartyViewRenderer cannot work with SMARTY_SPL_AUTOLOAD enabled. Set SMARTY_SPL_AUTOLOAD to 0.');

				}


				// including Smarty class and registering autoload handler

				require_once('Smarty-3.1.8/libs/sysplugins/smarty_internal_data.php');

				require_once('Smarty-3.1.8/libs/Smarty.class.php');


				// need this since Yii autoload handler raises an error if class is not found

				// Yii autoloader needs to be the last in the autoload chain

				spl_autoload_unregister('smartyAutoload');

				Yii::registerAutoloader('smartyAutoload');