When loading template and language files, SMF uses eval() instead of require_once()/include_once(). The specific reason for this is that, with eval(), if there is an error, PHP tells SMF. With include_once(), it just spits out an error.
Benchmarks show that eval() isn't much slower, and it's no more a security risk because we mean to include_once() the file anyway. However, if you have an accelerator installed, like eAccelerator, eval() is slower. Much slower. And it uses more memory, too.
As such, you'll want to run the following query to disable eval():
REPLACE INTO smf_settings
(variable, value)
VALUES ('disableTemplateEval', '1');
Please note that this will also disable the "pretty" error messages that highlight the line the error occured on, too. All you get is PHP's error message, after this. Still, it's not a huge price to pay... since you can always change it back to 0 when you mess with your templates.
-[Unknown]
Can't find how to enable disableTemplateEval, I've searched in the database whithout any result.
Cordially,
Johan
Run the query that [Unknown] posted in your database interface.
/me wonders if there should be an interface for this
I am not sure where to do this. After I submit the query, it says:
You have to choose at least one column to display.
Which column?
you should be able to do it after selecting your database in the left pane, then clicking sql
Quote from: groundup on April 18, 2007, 12:42:31 PM
/me wonders if there should be an interface for this
If it isn't already it would make sense to have it auto-enabled when caching is enabled
Ok, hey...way back when I never could figure out how to do this query thing..and I need to because I have like 10 billion errors in the forum error log..I need to figure how to resolve these I think.
Um...I am using MySql Administrator, can I use that to do this Query?
I am running my own home webserver and a buchna crap happened way back and it messed up my PHPMyAdmin and now I can't figure out how to fix it....it doesn't work anymore and I am pissed about the fact I spent 2 days trying to fix it and can't.
I basically don't know how to run a query period...Ima query noob!!
mee to ?
I am using MySql Administrator, can I use that to do this Query?
I dunno still how to do it correctly from MySQL Admin cause it didn't work for me when I tried it, but my question has been resolved doing it a different way here:
http://www.simplemachines.org/community/index.php?topic=192818.msg1227674#msg1227674
Worked and I have fixed all my errors as well :)