I am having a rather serious problem with my magento installation.

when trying to put through a test order i note that suddenly my checkout is no longer working i get the error

Fatal error: Undefined class constant 'CHECK_USE_FOR_COUNTRY' in /public_html/includes/src/Mage_Payment_Block_Form_Container.php on line 65

I have not actually done any changes to that file.

can anyone help


include/src/ is where magento places the 'compiled' classes. Do you have (or want) compilation mode to be enabled?

php -f shell/compiler.php -- state

Did you maybe install something, or recently clear the cache? Disable compilation, clear cache, then re-enable

php -f shell/compiler.php -- disable
php -f shell/compiler.php -- clear

Check outcome:

 php -f shell/compiler.php -- state

Now clear your cache, and re-enable compilation if you want to use it again. (but it could be possible that something got installed that does not work with compilation - which is an entire new question ;) )

  • i have done all that and uninstalled what i had recently installed- a couple of modules that should not have anything to do with that class. Same thing. My hosting support says this might have something to do with the last magento update but i think that's bollox. The last update was in november, surely it would have acted before now
    – lorakeen
    Feb 6 '15 at 12:42
  • now it's Undefined class constant 'CHECK_USE_FOR_COUNTRY' in public_html/app/code/core/Mage/Payment/Block/Form/Container.php on line 65
    – lorakeen
    Feb 6 '15 at 12:58
  • i have even restored the file to how it was on 2/2/15 with no success :(
    – lorakeen
    Feb 6 '15 at 13:02
  • Have you disabled compilation, and leave it off? - so disable, clear cache.
    – ProxiBlue
    Feb 6 '15 at 13:59
  • 1
    will post the result of teh compiler when i get home. thank you so much for your help
    – lorakeen
    Feb 6 '15 at 15:13

The constant CHECK_USE_FOR_COUNTRY that is referred to is defined in the following class:


If the constant is not defined, it means that there must be something wrong in that specific class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.