I don’t know what’s wrong with my code.
There is an error:
Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting T_STRING in /home/&&&&/public_html/oscommerce/admin/modules.php(313) : eval()'d code on line 1
This is the Line 313
eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
Values:
$value['set_function']
contains tep_cfg_select_option(array('Live', 'Sandbox'),
$value['value']
contains Live
$key
contains CONFIGURATION_PAYPAL
4
Answers
One possible reason is that the parenthesis don’t seem to match. You have 2 ) at the end while you only have one ( .
Will give you something like
That’s not correct I believe.
How about adding
(
after$value['set_function'] . "
? You haven’t opened the bracket after name of the function.Another thing is that T_NS_SEPARATOR error means that you have
somewhere where it shouldn’t be. Per: https://stackoverflow.com/a/6454891/2028547 – see the values of all your variables for weird characters.
Looks like whatever is in
$value['set_function']
or$value['value']
or$key
have ain
them
Try echoing what’s in
eval()
rather than runningeval()
– this will let you see the code PHP is trying to run.The error is basically saying that there’s a namespace seperator (
) in a strange place within the
eval()
‘d codeAre you absolutely sure you want to use eval()?
PHP documentation for
eval() says