hai can any one pls tel me why it comes
synyntax error, unexpected ‘<’ in C:\wamp\www\EECore1.6.3\EECore1.6.3\system\core\core.functions.php(638) : eval()‘d code on line 133
jenny
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
June 13, 2008 8:40am
Subscribe [4]#1 / Jun 13, 2008 8:40am
hai can any one pls tel me why it comes
synyntax error, unexpected ‘<’ in C:\wamp\www\EECore1.6.3\EECore1.6.3\system\core\core.functions.php(638) : eval()‘d code on line 133
jenny
#2 / Jun 13, 2008 8:46am
Jenny,
Are you also the same user as sreedevi by any chance?
Where are you seeing this error exactly and what are you doing to produce it. I mean what steps are you taking that are creating this behaviour. This isn’t really anything I’ve seen before as ExpressionEngine has always just worked ‘out of the box’ for me so have not seen this so if you can give a little more information perhaps as to where you are seeing this then that will probably help us out a lot more.
Best wishes,
Mark
#3 / Jun 13, 2008 9:35am
function evaluate($str)
{
return eval('?>'.$str.'<?php');
// ?><?php // BBEdit syntax coloring bug fix
}
syntax error, unexpected ‘<’ in C:\wamp\www\EECore1.6.3\EECore1.6.3\system\core\core.functions.php(638) : eval()‘d code on line 133
already i used call_user_func()in place of eval but it wont work
can u help me
#4 / Jun 13, 2008 9:51am
Hmmm,
Not really too sure where you are using this code or what for but your syntax is all over the place really. You don’t have any opening or closing PHP brackets so that will cause problems.
This code is syntactically correct but not too sure if it is what you are after or not ?
<?php
function evaluate($str)
{
return eval('?>'.$str.'<?php');
}
?>Would really help if you told us where you are trying to use this and what for though.
Best wishes,
Mark
#5 / Jun 20, 2008 12:57pm
Hi,
unfortunately, I have a similar error right now:
Parse error: syntax error, unexpected T_ELSE in /var/www/vhosts/domain.com/httpdocs/system-core/core/core.functions.php(637) : eval()‘d code on line 421
The error only shows on the “index” template of a group I created and only since I tried to add some content to the weblog that “belongs” to that template via XMLRPC (MarsEdit). First I had some XML-errors whith MarsEdit (see here) but once I had resolved them I got the syntax error on the template index.
Interestingly enough the article itself can be read without issues when I open the permalink. Oh, and replacing the template didn’t help either.
If I need to explain myself better (which is probably the case, since I’m fairly new to all this) then please let me know how I can help you helping me. 😉
Thanks in advance.
#6 / Jun 20, 2008 2:51pm
Update:
I tried to reproduce the error. It only occurs if I send data via XML RPC. I can edit the entry in EE, I see it in the DB (nothing strange here) yet on the index template I get the syntax error mentioned above. Also, I can’t read the entry via the permalink, it shows up empty.
#7 / Jun 23, 2008 6:00pm
if you have php enabled (on output, in my case), be careful with php-comments. something like this ...
...
{if segment_1}
{categories}
{exp:query sql="SELECT cat_name, cat_id, parent_id, cat_image FROM exp_categories WHERE cat_id = '{category_id}'"}
<?php
$par = "";
$par = "{parent_id}";
$item_cats[] = "{category_id}";
$catboxcolor = "";
// 22.06.2008 htmlentities for solving problems with php-parsing
$catboxcolor = "{cat_image}";
....gives the error discussed in this thread above while this:
...
{if segment_1}
{categories}
{exp:query sql="SELECT cat_name, cat_id, parent_id, cat_image FROM exp_categories WHERE cat_id = '{category_id}'"}
<?php
$par = "";
$par = "{parent_id}";
$item_cats[] = "{category_id}";
$catboxcolor = "";
$catboxcolor = "{cat_image}";
.......works like expected (just removed the // comment). the comment itself is meaningless.
in my case, this occurs in more than a single template after upgrading from 1.4.2 to 1.6.3
(after a server-change with a downgrade from php5 to php4.3.10, to make it a bit uncommon, i think)
#8 / Jun 23, 2008 6:30pm
Thanks fluctus, actually there was a problem with some php I had forgotten to edit out. Also, I had another error in the template structure.
But now it works perfectly 😊