Warning: Smarty error: unable to read resource:

拜拜、爱过 提交于 2019-12-12 01:29:14

问题


I installed new version of sugarCRM, and in some page is show up next warning"

Warning: Smarty error: unable to read resource: ....

I spend a lot of time on web to find solution but with out success, I hope someone can help me.


回答1:


I wasn't able to find what triggered this error for me. I looked for any odd register_resource calls but didn't find any. I ended up suppressing the warning. This is for Smarty 2

@@ -1411,7 +1411,7 @@
 {

     $_params = array('resource_name' => $resource_name);
-        if (! $this->_fetch_resource_info($_params)) {
+        if (! @$this->_fetch_resource_info($_params)) {
         return false;
     }



回答2:


I have the same problem when i use smarty 2 as template engine. I have used xampp as localhost. since i am using windows, i didn't face permission issue for the template directories and directory spelling issues. But i have also checked permission for folder and it was 777,and other solution provided in https://www.smarty.net/docsv2/en/troubleshooting.

Finally updating the Smarty library solve my issue. Download the latest Smarty files and Replace them with your current library.

https://github.com/smarty-php/smarty/releases/tag/v2.6.31 unzip ->\smarty-2.6.31\libs copy files from \libs folder and paste it to your smarty Library -> \library\Smarty.

Hope it helps.



来源:https://stackoverflow.com/questions/14933007/warning-smarty-error-unable-to-read-resource

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!