skip to Main Content

I have an old osCommerce site that was PHP4, now running on PHP5. Named constants defined with define() are being evaluated incorrectly:

$string = '<a href="http://www.oscommerce.com" target="_blank">' . BOX_ENTRY_SUPPORT_SITE . '</a><br>';

will show as BOX_ENTRY_SUPPORT_SITE, not the value placed in BOX_ENTRY_SUPPORT_SITE.

Something needs to be changed in php.ini?

2

Answers


  1. No, AFAIK constants behavior hasn’t changed.

    Most likely the constant is not defined; try to find where it’s being defined and see if the file is being loaded by your script (ie: by require or include)

    Login or Signup to reply.
  2. I never ran into this problem when putting osCommerce sites on PHP5 from PHP4.

    Most probably, that define isn’t being define()‘d correctly. The default behaviour (with error reporting relaxed) is to show the constant like that when it isn’t found.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search