bryantms
12-30-2007, 10:56 PM
I'm trying to install Smarty (the PHP template engine) and am having the following issue. I've got this error:
Warning: require(./Smarty/Smarty.class.php) [function.require]: failed to open stream: No such file or directory in /home/hancockn/public_html/fearandfacts/weblog/smarty.php on line 4
Fatal error: require() [function.require]: Failed opening required './Smarty/Smarty.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hancockn/public_html/fearandfacts/weblog/smarty.php on line 4
When running this file:
<?php
// Use the absolute path for Smarty.class.php
$base_path= basename(dirname(_FILE_));
require($base_path.'/Smarty/Smarty.class.php');
$smarty = new Smarty( );
$smarty->template_dir = $base_path.'/weblog/smarty/templates';
$smarty->compile_dir = $base_path.'/weblog/smarty/templates_c';
$smarty->cache_dir = $base_path.'/weblog/smarty/cache';
$smarty->config_dir = $base_path.'/weblog/smarty/configs';
?>
Now based on the error above I know that it can't find the Smarty.class.php file. As this is an addon domain I'm wondering where this and the other required files need to be? I've put it in the root folder of the domain, the root of the main domain, and the PHP folder of the main domain and have had no luck. I even tried putting these in a PHP folder in the addon domain root.
Does anyone have any advice to help me out? Thanks!
Warning: require(./Smarty/Smarty.class.php) [function.require]: failed to open stream: No such file or directory in /home/hancockn/public_html/fearandfacts/weblog/smarty.php on line 4
Fatal error: require() [function.require]: Failed opening required './Smarty/Smarty.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hancockn/public_html/fearandfacts/weblog/smarty.php on line 4
When running this file:
<?php
// Use the absolute path for Smarty.class.php
$base_path= basename(dirname(_FILE_));
require($base_path.'/Smarty/Smarty.class.php');
$smarty = new Smarty( );
$smarty->template_dir = $base_path.'/weblog/smarty/templates';
$smarty->compile_dir = $base_path.'/weblog/smarty/templates_c';
$smarty->cache_dir = $base_path.'/weblog/smarty/cache';
$smarty->config_dir = $base_path.'/weblog/smarty/configs';
?>
Now based on the error above I know that it can't find the Smarty.class.php file. As this is an addon domain I'm wondering where this and the other required files need to be? I've put it in the root folder of the domain, the root of the main domain, and the PHP folder of the main domain and have had no luck. I even tried putting these in a PHP folder in the addon domain root.
Does anyone have any advice to help me out? Thanks!