Page 1 of 1

2.0 PHP function not allowed by security setting

Posted: Thu Sep 10, 2015 5:37 pm
by JamesT
I previously used the information here in 1.12 to create an RSS feed reader with Smarty: http://www.cmscanbesimple.org/blog/a-xm ... ain-smarty

However in 2.0 it now produces: Syntax error in template "content:content_en" on line 11 "{$xml = simplexml_load_file('http://www.xxxxx.com')}" PHP function 'simplexml_load_file' not allowed by security setting

Can I not use this function anymore? Any other way to achieve this?

Re: 2.0 PHP function not allowed by security setting

Posted: Thu Sep 10, 2015 6:47 pm
by Rolf
Have you tried to disable the security setting?
Add to config file:

Code: Select all

$config['permissive_smarty'] = 1;

Re: 2.0 PHP function not allowed by security setting

Posted: Thu Sep 10, 2015 6:50 pm
by JamesT
Thanks Rolf, that worked.

I had hoped maybe there was an alternative solution to making smarty permissive, but I suppose there isn't.