We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14214
    • 299 Posts
    So this is strange.

    I have a large resource that is a very long page with many tables displaying data - all static info. In 2.3 it will not load. I went to my error log and found this:
    [31-Jul-2014 12:25:41 UTC] PHP Fatal error:  Out of memory (allocated 193462272) (tried to allocate 71 bytes) in /home/user-name/public_html/assets/snippets/loopDbChunk/LoopDBChunk.php on line 47
    


    My memory_limit: 1000M

      • 3749
      • 24,544 Posts
      LoopDbChunk was released in 2011. It's an alpha version, and as far as I can tell, there's never been a stable version or even a beta. I would be very surprised if it worked in MODX 2.3.

      What are you using it for, exactly?
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 14214
        • 299 Posts
        Bob;

        I am disable and see if that solves it. I have a few sites where I need to pull a row of data from an table and display in a grid. As I am not a programmer I have had difficulty using some of the methods you and Susan recommended.

        An extra that would allow the user to set a few items in the call (table and what to look for) just as LoopDb promises would be incredibly valuable for us noobs.
          • 3749
          • 24,544 Posts
          Is it a custom table, or one of the regular MODX tables?

          Take a look at this: http://rtfm.modx.com/extras/revo/rowboat
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
          • You might want to check your settings again, as the error is indicating your PHP Memory limit is 192MB. Personally, I wouldn't push that value above 256 without a very good reason as it's excessive, generally not required, and you are going to have some other problems before a larger value will benefit you.

            Just to give you an example, one of the sites I am working on has a PHP Memory limit of 256MB. The install has 373 contexts and 88,202 resources and believe it or not functions. This in my mind is a decent reason for the larger limit, plus the database totals 175MB without log and session tables that can drive it up to 300+MB
              Patrick | Server Wrangler
              About Me: Website | TweetsMODX Hosting
              • 14214
              • 299 Posts
              Thanks Patrick.
              • Of course, this isn't your doing, but I strongly disapprove of having any .php files in the /assets/ directory! In fact, I often put an .htaccess file in that directory to disallow all access to any .php file in that entire section of a site. Far too many nasty hacks stick their control scripts there. Whoever wrote that snippet should have been more careful about where he put his stuff. The assets section is for resources that the browser requests, such as .js or .css files, videos, images, files for download, etc. .php files belong in the core/components/component-name/ directory.

                You might also want to try migxLoopCollection from the MIGX set of tools.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org