We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    I set up a PDF as a static resource so it could show up in menus etc. with other static materials, but when I try to click on it, PHP chokes:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 281542 bytes) 
    in /path/to/modx/core/model/modx/modparser.class.php on line 97


    It’s a PDF file:
    Content Type = HTML
    content disposition type = Attachment
    NOT cacheable

    I’ve tried this with content type = PDF (I think that’s a type I created), but I still get the error. In the end I had to just put a static link to the file.

    Anyone else have an issue like this?
      • 6228
      • 249 Posts
      My test ran ok:

      10mb PDF file
      application/pdf mime-type
      non-cacheable
      Revo 2.0.3

      Although I have 512mb of ram allocated for PHP, which is unusually large.
        lo9on.com

        MODx Evolution/Revolution | Remote Desktop Training | Development
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        It’s on a shared host, so my PHP memory limits aren’t that high... I’ll have to cross-check this on a dedicated server where I can set PHP memory limits.