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

Smarty can't create directories in WinXP?

 
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 -> General
View previous topic :: View next topic  
Author Message
m3avrck
Guest





PostPosted: Wed Jul 16, 2003 10:31 pm    Post subject: Smarty can't create directories in WinXP? Reply with quote

Hi all! Well I'm running WinXP with Apache 1.3.27 and PHP 4.3 and MySQL 4.0 and Smarty 2.5. PHP and MySQL are running great, however, Smarty is having a little trouble.

For some reason, I keep getting this error trying to run Smarty:

Code:

  Warning: Smarty error: problem creating directory "\%%117\%%1172603085" in d:\my documents\web design\websites\smarty-2.5.0\libs\Smarty.class.php on line 1042


I think it is some sort of permissions problem, but I'm not sure. Also, I'm trying to run the included demo with Smarty and have added the following to it:

Code:

    $smarty->template_dir= 'D:\\My Documents\\web design\\websites\\smarty-2.5.0\\demo\\templates\\';
    $smarty->compile_dir= 'D:\\My Documents\\web design\\websites\\smarty-2.5.0\\demo\\templates_c\\';
    $smarty->config_dir= 'D:\\My Documents\\web design\\websites\\smarty-2.5.0\\demo\\configs';
    $smarty->cache_dir= 'D:\\My Documents\\web design\\websites\\smarty-2.5.0\\demo\\configs\\cache\\';
       
    $smarty->caching= false;


Any ideas? Thanks guys.
Back to top
boots
Administrator


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

PostPosted: Wed Jul 16, 2003 11:52 pm    Post subject: Reply with quote

hi m3avrck.

1) If you are using safe mode, then you must also set use_sub_dirs = false.
2) don't use trailing slashes when assigning the directories
3) the templates_c and cache directories must exist Smile and the user that owns the running instance of apache must have write permissions in the template_c and cache directories--probably best not to keep them under My Documents...

You may find this post to be a useful starting point.

HTH
Back to top
View user's profile Send private message
m3avrck
Guest





PostPosted: Thu Jul 17, 2003 12:41 am    Post subject: Reply with quote

Aha! So I created a templates_c and a cache directory, and then it all worked Very Happy

Hmmm, maybe they should include these directories by default in the demo object folder, I know that would have saved me a headache!
Back to top
boots
Administrator


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

PostPosted: Thu Jul 17, 2003 12:55 am    Post subject: Reply with quote

They don't pre-exist just because it is important that the installer ensures the directories have appropriate ownership (ie. correct user) and also appropriate privledges for that owner. Obviously, there is no generic way of creating the directories that would do that for every possible system on every supported os.

Besides, the manual is fairly clear about that Smile

Glad you got it to work--I hope you find Smarty useful.


Last edited by boots on Thu Jul 17, 2003 1:23 am; edited 1 time in total
Back to top
View user's profile Send private message
m3avrck
Guest





PostPosted: Thu Jul 17, 2003 1:00 am    Post subject: Reply with quote

Hmmm, guess I just figured the demo would work out of the box, but I understand why it doesn't. Actually, this is the 2nd project I'm using with Smarty. Haven't used it since last Novemember, so I'm a bit rusty, Laughing And I'm glad to see the support for Smarty has grown so much since then.

Thanks for the help, appreciated!
Back to top
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 -> General 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