问题
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