Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

newbie can't get Smarty to work (with Demo)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
lewb
Smarty n00b


Joined: 17 Mar 2004
Posts: 3

PostPosted: Wed Mar 17, 2004 11:31 pm    Post subject: newbie can't get Smarty to work (with Demo) Reply with quote

Hi All,

Just downloaded Smarty 2.62 on Windows XP. Uses IIS5.1 and Zend Studio. I start debugging with index.tpl; creates new Smarty instance, but SMARTY_DIR is set to "../libs\", which looks a little weird. Then it can't find files, although the pathnames in error messages look ok, except for the weird beginnings (../libs\).

Error msgs like this:
<br />
<b>Warning</b>: fetch(../libs\core\core.get_microtime.php): failed to open stream: No such file or directory in <b>../libs/Smarty.class.php</b> on line <b>1157</b><br />
<br />
<b>Warning</b>: _get_auto_filename(../libs\core\core.get_include_path.php): failed to open stream: No such file or directory in <b>../libs/Smarty.class.php</b> on line <b>1780</b><br />
<br />
etc., etc....

Can someone point me in the right direction? Smarty looks like the way to go, if I can just get this thing started Smile
_________________
LewB
Back to top
View user's profile Send private message
boots
Administrator


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

PostPosted: Thu Mar 18, 2004 12:57 am    Post subject: Reply with quote

Set the constant SMARTY_DIR to the absolute path where you installed the smarty/libs directory prior to requiring the Smarty class file.
Back to top
View user's profile Send private message
lewb
Smarty n00b


Joined: 17 Mar 2004
Posts: 3

PostPosted: Thu Mar 18, 2004 4:32 am    Post subject: Reply with quote

Thanks, Boots. That worked.

But now Demo not only cannot find index.tpl, but also says that "$compile_dir 'templates_c' ...does not exist, or is not a directory".

Zend Studio shows that $compile_dir 'templates_c' does contain the absolute pathname. ($compile_dir = "d:\\php\\smarty\\smarty-2.6.2\\demo\\templates_c\\"Wink. And directory templates_c really does exist at that pathname.

Part of the problem could be my inability to properly set permissions on my Windows XP Pro operating system.

I really appreciate your help, and know I may be on the edge of success.. Very Happy
_________________
LewB
Back to top
View user's profile Send private message
boots
Administrator


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

PostPosted: Thu Mar 18, 2004 5:33 am    Post subject: Reply with quote

Hi lewb,

Sounds like this might help you: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=1519 and this recent one http://www.phpinsider.com/smarty-forum/viewtopic.php?t=2168
Back to top
View user's profile Send private message
lewb
Smarty n00b


Joined: 17 Mar 2004
Posts: 3

PostPosted: Thu Mar 18, 2004 8:05 pm    Post subject: Reply with quote

Thanks again, boots. Safe_mode wasn't set, but that certainly was the 'likeliest' candidate.

I succeeded when I assigned absolute pathnames to each of the four directory variables (like $smarty.compile_dir).

Now I'll give Smarty a workout Laughing
_________________
LewB
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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