Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
I have a problem ....

 
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
Hansa
Smarty n00b


Joined: 21 May 2003
Posts: 3
Location: Germany

PostPosted: Wed May 21, 2003 9:58 am    Post subject: I have a problem .... Reply with quote

Fatal error: Failed opening required 'backends/smarty/libs/Smarty.class.php' (include_path='.:/usr/local/lib/php') in /users/coolfreepage.com/rhodanuniverse/footer.php on line 53

(lines)
52 // Smarty Templates!
53 require_once (SMARTY_CLASS);
54 $smarty = new Smarty;
55 $smarty->template_dir = "./templates/";
56 $smarty->compile_dir = "./templates_c/";

have anybody an idea if yes please tell me Razz
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Hansa
Smarty n00b


Joined: 21 May 2003
Posts: 3
Location: Germany

PostPosted: Wed May 21, 2003 3:19 pm    Post subject: Reply with quote

Shocked
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
toma
Smarty Regular


Joined: 25 Apr 2003
Posts: 62

PostPosted: Wed May 21, 2003 3:58 pm    Post subject: Reply with quote

Look at the error message. Your smarty dir is definatly not in the include path. Either add it to your include path or give the full path
(include_path='.:/usr/local/lib/php')
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5613
Location: Toronto, Canada

PostPosted: Wed May 21, 2003 5:28 pm    Post subject: Reply with quote

SMARTY_CLASS ? SMARTY_DIR is a better constant to set (SMARTY uses it) and then use it like:

Code:
include SMARTY_DIR . 'Smarty.class.php';


If you use SMARTY_CLASS, consider doing so as follows:

Code:
define('SMARTY_DIR', '/absolute path to your smarty dir/');
define('SMARTY_CLASS', SMARTY_DIR . 'Smarty.class.php');


2c
Back to top
View user's profile Send private message
Hansa
Smarty n00b


Joined: 21 May 2003
Posts: 3
Location: Germany

PostPosted: Thu May 22, 2003 11:03 am    Post subject: Reply with quote

52 // Smarty Templates!
53 define('SMARTY_DIR', '/backends/smarty/');
54 define('SMARTY_CLASS','SMARTY_DIR' .'Smarty.class.php');
55 $smarty = new Smarty;
56 $smarty->template_dir = "./templates/";
57 $smarty->compile_dir = "./templates_c/";

-----------------------------------------

Fatal error: Cannot instantiate non-existent class: smarty in /users/coolfreepage.com/rhodanuniverse/footer.php on line 55

Hm I think I did it but error again anyone have a clue ?

thanks anyway
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 236
Location: Purdue University

PostPosted: Thu May 22, 2003 11:39 am    Post subject: Reply with quote

Code:
require_once(SMARTY_DIR . "Smarty.class.php");

_________________
"Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP