We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36635
    • 41 Posts
    Hi, I'm getting a lot of these errors logged:

    Sep 19 12:00:52 host httpd: PHP Fatal error: Undefined class constant 'LOG_LEVEL_FATAL' in /var/www/vhosts/.../httpdocs/core/model/modx/modx.class.php on line 2049
    Sep 19 12:01:42 host last message repeated 3 times

    where php is saying a modx class constant is not defined...I've tried putting some error_log() calls but I get 500 server errors (and no log) if I log much or if I try seeing if modX::LOG_LEVEL_FATAL is defined, such as:
    error_log("no log level fatal defined!, " . $msg . "\n " . print_r(debug_backtrace(), true));

    How could the code be here and not have class constants defined?
    Running latest Revo 2.1.3, php 5.3.3
    thanks for any advise on debugging this,
    ---avibodha

      • 28215
      • 4,149 Posts
      splittingred Reply #2, 15 years ago
      Turn off APC or eAccelerator caching.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 36635
        • 41 Posts
        right on the mark, thanks!
        APC was the culprit, using latest version, 3.1.9.

        only happens in manager so I'll try just disabling for /manager

        thanks much

        UPDATE - nope, must totally disable APC, otherwise assorted weird errors [ed. note: avibodha2 last edited this post 15 years ago.]
          • 22897 ☆ A M B ☆
          • 209 Posts
          I encountered this today, any pointers why MODX doesn't play nice with APC? The system requirements page still lists it as recommended; is there a buggy version of APC or another issue involved? I've looked for a ticket but not found one.
            MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!