View previous topic :: View next topic |
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 !! |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
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_<Machine name>, 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] |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jan 22, 2014 6:07 pm Post subject: |
|
|
Thanks for the info, I'm making this one sticky. |
|
Back to top |
|
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. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
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". |
|
Back to top |
|
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. |
|
Back to top |
|
Dwza Smarty Rookie
Joined: 09 Jan 2015 Posts: 7
|
|
Back to top |
|
|