We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 436 ☆ A M B ☆
    • 265 Posts
    I’ve suddenly run into a weird crash/error situation on a MODX site.

    The sites running on Media Temples grid system, MODX Revolution 2.1.0-rc3 (traditional)

    At seemingly random times the front-end and the back-end crash and display a page like this:



    Most of the code thats being spat out seems like a partial fragment of the /core/cache/system_settings/config.cache.php file - as when this file is deleted the website starts working, but soon randomly crashes again.

    I think the answer to the source of this crash might be at the end of the errors here:

    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /nfs/c01/h13/mnt/13706/domains/new.domain.com/html/core/model/modx/modx.class.php on line 2005
    
    Fatal error: Class 'modContext_' not found in /nfs/c01/h13/mnt/13706/domains/new.domain.com/html/core/xpdo/xpdo.class.php on line 613


    But I’m not familiar enough with modContext_ or modx.class.php to figure out what the problem is.

    I’ve also completely disabled caching, with the cache settings looking like this:

    with Enable Database Cache switched to No and Disable Global Cashing Options to Yes - yet this error still persists.

    I’ve also tried reinstalling MODX; but when I get to the final stage of the reinstallation, where I click the Install button and the URL looks like http://new.domain.com/setup/index.php?action=install it crashes again.
      MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      When trying a reinstall, did you also try to upload all files again? My first guess would be there’s a class file missing, although that wouldn’t explain why it would sometimes work and sometimes wont.

      Has it always been like this, or did the problem suddenly appear?


      I’ve read another topic recently in regards to (mt) GS - perhaps if you share a little more server information Jason or Shaun have any idea on specifics.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 436 ☆ A M B ☆
        • 265 Posts
        Yeah, I re-uploaded all the files again a couple of times - on one attempt I didn’t recopy the /core/components/ and /core/packages/ folders to try and narrow down the cause of this crash - and the system crashed again.

        This is leading me to think that perhaps there’s something in the database thats causing this?

        As far as I can recall, this started happening when the client and I decided to scrap using phpThumb; so we removed all instances of phpThumb and uninstalled it via the Package Manager - thats the last notable thing I can think of doing before this occurred.

        Although it crashes randomly on Recourse saves, chunk saves, etc it always crashes after I clear the cache in the Manager - even if I’ve manually deleted the /core/cache/ folder so its empty, then I clear the cache via the Manager I get this same crash.

        Here’s some more system info:
        Database version: 4.1.25-Debian_mt1
        PHP Version: 5.2.14
          MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.
          • 18373 ☆ A M B ☆
          • 3,141 Posts
          What instances of phpthumb did you actually scrap?

          You can uninstall PhpthumbOf (which is just a snippet) but Phpthumb is built into the core and is used for displaying thumbs in image tvs, resource browser etc.. I do assume you didn’t remove it from the core?


          If you reuploaded from the same source, you could try downloading the latest and see if that makes a difference. Sometimes stuff gets lots during unzip or download.

          Anyway, line 2005 combines configuration from system defaults and several attempts at getting settings from the cache, system settings etc. It could be that something in there is corrupt that causes it to freak out...

          613 is a generic class loader thingy.
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.