Jump to content

Help with an error message


Looktrne

Recommended Posts

My error log is showing this error:

 

[04-Jun-2009 07:11:48] PHP Parse error:  syntax error, unexpected ';', expecting T_STRING or T_VARIABLE or '{' or '$' in /home/meetan5/public_html/smartway/lib/system.lib(333) : eval()'d code on line 1

[04-Jun-2009 07:11:48] PHP Parse error:  syntax error, unexpected ';', expecting T_VARIABLE or '$' in /home/meetan5/public_html/smartway/lib/system.lib(334) : eval()'d code on line 1

 

the code producing the error is inside a function here are the lines

 

eval("global \$".strtolower((strpos($token, "[") ? substr($token, 0, strpos($token, "[")) : $token)).";");
				eval("\$sVal = \$".strtolower($token).";");

 

could anyone let me know why this is throwing an error?

 

thanks

 

Paul

Link to comment
Share on other sites

Try putting your code in a variable, printing the variable and THEN calling eval on it.  That way you can see what code you are trying to run.  Eg

 

$str = "print 'hello';";
print "Executing $str\n";
eval($str);

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.