Smarty The discussions here are for Smarty, a template engine for the PHP programming language.
Author Message
marchyang
Smarty n00b

Joined: 21 Jan 2014
Posts: 3

 Posted: Tue Jan 21, 2014 4:05 am    Post subject: Smarty 3.1.6 with IIS 7.5 & 8.0 for Windows Server 2008R Can anyone tell me how to solve this problem ? Fatal error: Uncaught --> Smarty: unable to write file .\templates_c\wrt52dde9fe9c8358.95452229 <-- thrown in C:\inetpub\wwwroot\libs\sysplugins\smarty_internal_write_file.php on line 44 I have tried to install Smarty on 2008R2 & 2012R2 with PHP 5.5 & IIS 7.5 & 8.0 via Web Platform Installer 4.6.2 from Microsoft. I am sure the PHP is workable by phpinfo() displaying information of PHP 5.5. The message come from the download of smarty 3.1.6's lib & demo folder. I extract it and copy & past to the c:\inetpub\wwwroot, the problem is even I uncheck the read-only for the folder template_c and make it write permission for IIS_IUSRS, both of them are failure to solve the problem. Any help is appreciate !!
mohrt

Joined: 16 Apr 2003
Posts: 7362

 Posted: Tue Jan 21, 2014 2:22 pm    Post subject: Search the forum for windows and write permissions, windows can be stubborn. Here is a start: http://www.smarty.net/forums/viewtopic.php?t=13821
marchyang
Smarty n00b

Joined: 21 Jan 2014
Posts: 3

 Posted: Wed Jan 22, 2014 9:37 am    Post subject: I fixed this problem finally... Thanks everybody. I studied the following url http://support.microsoft.com/default.aspx?scid=kb;en-us;Q271071 and check with Windows Server 2012, I wonder what's difference between IIS_USRS and IUSR_, and the answer is that I granted permission to IIS_USRS was wrong, but should I grant write permission to IUSR who is new anonymous account created in Windows Server 2012 and restart IIS. Then I browse the http://localhost/demo/index.php it works. I don't understand the reason why, but maybe I think when users browser the page, then IIS needs write permission for anonymous user but not IIS_IUSRS itself to write files during the session. [/url]
mohrt

Joined: 16 Apr 2003
Posts: 7362

 Posted: Wed Jan 22, 2014 6:07 pm    Post subject: Thanks for the info, I'm making this one sticky.
AmandaPratt184
Smarty Rookie

Joined: 02 Jan 2015
Posts: 5

 Posted: Wed Feb 25, 2015 5:58 am    Post subject: Good idea Nice idea, one of our team members was struggling with the same thing. This would help him. Thanks.
AnrDaemon

Joined: 03 Dec 2012
Posts: 927

Posted: Wed Feb 25, 2015 5:51 pm    Post subject: Re: I fixed this problem finally...

 marchyang wrote: I don't understand the reason why, but maybe I think when users browser the page, then IIS needs write permission for anonymous user but not IIS_IUSRS itself to write files during the session.

This is called "privilege separation".
ColleenPeterson521
Smarty n00b

Joined: 22 Jan 2015
Posts: 2

 Posted: Mon Mar 09, 2015 10:05 am    Post subject: Hey thanks for the great answers. Umm, does anyone have any idea on where can I find complete info on setting privileges and permissions? And, maybe some use cases as well.
Dwza
Smarty Rookie

Joined: 09 Jan 2015
Posts: 5

 Posted: Tue Feb 07, 2017 10:06 am    Post subject: Similar problem with WinSrv2012r2 but this doesnt solves it. May take a look at my post http://www.smarty.net/forums/viewtopic.php?t=26719
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT Page 1 of 1

 Jump to: Select a forum General----------------AnnouncementsInstallation and SetupFAQ (Frequently Asked Questions)TestimonialsShowcaseHelp Wanted (commercial) User Supported Help----------------GeneralTips and TricksPluginsAdd-onsFrameworksArticle Discussions Development----------------Smarty DevelopmentFeature RequestsBugsDocumentationSmarty 3 International Discussions----------------Language: GermanLanguage: FrenchLanguage: PortugueseLanguage: RussianLanguage: SpanishLanguage: ItalianLanguage: JapaneseLanguage: PersianLanguage: PolishLanguage: Indonesian
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