1

I'm working in OsCommerece and getting this up in my error log

PHP Parse error: syntax error, unexpected T_STRING in public_html/includes/classes/seo.class.php(2206) : eval()'d code on line 1

WestWeb
  • 31
  • 1
  • 4

1 Answers1

1

Maybe just remove the <?php, ?> tags, as seo.class.php seems to run the input through eval()

mixed eval(string $code)

The code mustn't be wrapped in opening and closing PHP tags...

huysentruitw
  • 27,376
  • 9
  • 90
  • 133
  • Tried removing the tags, broke the site...quickly put them back. – WestWeb Jul 19 '13 at 11:04
  • then you'll need to improve your answer and show us some surrounding code, f.e. what's in $cache_data ? where does it come from? can you place a `var_dump($cache_data)` before the `eval` on line 2206, and add that output to your answer? – huysentruitw Jul 19 '13 at 11:20
  • Appreciate the help so far. Had a look in the dbase at `$cache_data` has a heap of numbers in it e.g S0lNy8xL1VD3dfQLdXN0Dg... Placing `var_dump($cache_data)` resulted in this being display on screen `string(92) "define('MANUFACTURER_NAME_2', 'sitename'); define('MANUFACTURER_NAME_3', 'productname'); "` – WestWeb Jul 19 '13 at 12:54
  • Lines 2178-2244 are here `http://pastebin.com/Q1W2an38` this is the function that line 2206 lives in. Happy to provide on info if needed – WestWeb Jul 19 '13 at 12:59
  • And right after the var_dump, you got the syntax error as in the title of your question? – huysentruitw Jul 19 '13 at 13:16
  • Once I included the var_dump in the code I got this `string(92) "define('MANUFACTURER_NAME_2', 'sitename'); define('MANUFACTURER_NAME_3', 'productname'); "` – WestWeb Jul 19 '13 at 13:53
  • That was visable on the website its self at the top – WestWeb Jul 19 '13 at 13:53
  • since the eval is executed right after the var_dump, you should have seen the same error... It looks like something else is wrong in your code which you're not showing. I'm affraid I can't help you any further. – huysentruitw Jul 19 '13 at 13:55