Hi there,
I am receiving this error message…
what is causing it?
what do I need to do?
Parse error: syntax error, unexpected T_ELSE in system/expressionengine/libraries/Functions.php(659) : eval()‘d code on line 1
Am running EE 2.4
Cheers,
Edd
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
May 30, 2012 6:22am
Subscribe [1]#1 / May 30, 2012 6:22am
Hi there,
I am receiving this error message…
what is causing it?
what do I need to do?
Parse error: syntax error, unexpected T_ELSE in system/expressionengine/libraries/Functions.php(659) : eval()‘d code on line 1
Am running EE 2.4
Cheers,
Edd
#2 / May 30, 2012 10:03am
Here’s what I did to see what is causing the error. I opened Functions.php, and modified the evaluate function like this:
function evaluate($str)
{
// return eval('?'.'>'.$str.'<?php ');
$x = eval('?'.'>'.$str.'<?php ');
if($x === false) {
$timestamp = date("m-d-Y H:i:s");
$msg = "Timestamp:".$timestamp."\n".$str;
$fp = fopen("/var/tmp/evaluate_function.txt", 'a');
fwrite($fp, $msg . "\n");
fclose($fp);
exit;
} else {
return $x;
}
}What this does is if a template fails to parse, it saves the text from the template in a file so you can determine which template caused the error. I’m surprised that EE hasn’t given us a better way to do this.
#3 / May 30, 2012 10:15am
Great thanks!