Loading...
Changes Saved.
Error Occurred!

KnowledgeBase

Smarty Compile Problems

We have had a couple of clients who had issues with Smarty throwing out the message:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /path/to/installation/of/supporttrio/admin/functions/smarty/Smarty_Compiler.class.php(270) : regexp code on line 6
Fatal error: Failed evaluating code: '{php' . str_repeat(" ", substr_count('{literal} ......

That is a PHP bug, not a Smarty template or SupportTrio bug. It is described here.

The solution for this problem is to turn off the "magic_quotes_sybase" setting in PHP configuration. That can be done either by editing your server's php.ini configuration file, or by adding a file named .htaccess into your SupportTrio installation folder with the following content:
php_flag magic_quotes_sybase Off

The other way is simpler, but some servers do not allow a modification of server configurations through .htaccess files. If you are unsure about how to fix this, please contact your ISP and let them know what needs to be done.


UPDATE:
Aparently turing it off in htaccess only partially works. For example, the same error could still be seen on Settings > Mail Sending Options. Turing the setting to off in php.ini made the problem go away.



Related Articles