We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • still have errors in log.

    in /home/user/public_html/core/model/modx/modresponse.class.php:189 i have:
    @session_write_close();
    echo $this->modx->resource->_output;
    while (@ob_end_flush()) {}
    flush();
    session_write_close(); //manual added
    exit();

    and in /home/user/public_html/core/cache/includes/elements/modplugin/16.include.cache.php i have:

    header ('X-XFPC-Cache-Active: Yes');

    ideas?
      palma non sine pulvere
      • 3749
      • 24,544 Posts
      My guess is that a plugin or snippet is throwing an E_NOTICE warning prior to that point, which would explain the "headers already sent" issue.
        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
        • 38339
        • 41 Posts
        found this blog post, where they talk about "Jan Tezner's (COEX) image optimization tip for PHPThumbOf".
        Jan's tip involved changing the default-settings of phpthumbof (maxage, maxfiles and maxsize). He told us to set these settings to 0, which effectively results in them being disabled. This means there won't be any cache clearing by phpthumbof.....
        The great thing about Jan's solution is the cronjob which fixes this + it doesn't change any phpthumbof code. It also helps lowering the server load a lot.

        The implementation time of the phpthumbof fix is:

        • Changing 3 system settings: 1 minute
        • Adding a cronjob: +-10 minutes
        until now there are no more detailled information about this cronjob config. Does anyone know how to config this?
          Revolution 2.2.6
        • Hi to everyone and thx to mindeffects for noticing me!

          This improvement is about changing three system settings keys for phpThumb:

          • phpthumb_cache_maxage
          • phpthumb_cache_maxfiles
          • phpthumb_cache_maxsize

          If you set all these three keys to 0, phpThumb will skip cleanup of thumbnails directory. This cleanup (done by method CleanUpCacheDirectory() in file \core\model\phpthumb\phpthumb.class.php) is really demanding on performance of MODX if there are lot of thumbnails (say hundreds).

          When phpthumbof output modifier (snippet) is used, in each use is called this cleanup method which iterate over all files in cache directory. Then if someone call phpthumbof on tens of images in one page and cache directory conaints 500 of images, then PHP make many unnecessary check of file size/date/count.

          After change of these system settings you should think about cleanup of cache directory. Little bit of coding and use CRON should help.

          Hope this make sense and will help to someone! [ed. note: Hansek last edited this post 11 years, 2 months ago.]
            Freelance Web Developer who likes MODX, PHP, jQuery, ExtJS, SASS and other cool web things. Currenty doing great stuff at COEX CZ.

            GitHub: https://github.com/hansek
            Follow me: https://twitter.com/jantezner
            Or follow us: https://twitter.com/coexcz

            http://www.modx.cz || http://www.coex.cz
            • 36624
            • 535 Posts
            @Hansek Thank you for explaining your technique. I was also waiting more details about this point.

            As i'm not a coder, can someone share the code to clear the cache directory ? smiley

            Would be nice to call this code from top menu.. "Clear PhpThumb cache"...
              CTRL+SHIFT+U - Clear Cache
              CTRL+SHIFT+H - Hiding Heft Panel
              CTRL+SHIFT+N - Fast Create Resource
              CTRL+ALT+P - Preview Recource (in edit resorce window)
              CTRL+ALT+S - Save
              • 38339
              • 41 Posts
              Attention --> not tested

              think, you can create a cronjob like this (depends on your environment):
              0 * * * * /path/to/your/script.pl
              // means, run every hour //

              inside script:
              rm -fr /var/www/USER/html/core/cache/phpthumb/*
              // depends on your folder structure //

              with a cronjob you don't have to care anymore
                Revolution 2.2.6
              • Excuse me for the stupid question: if I don't clean the phpthumb cache folder I will have problem of space or also of correct visualization?
                  TilliLab | MODX Ambassador
                  website
                • IMHO This should only affect space smiley
                    Freelance Web Developer who likes MODX, PHP, jQuery, ExtJS, SASS and other cool web things. Currenty doing great stuff at COEX CZ.

                    GitHub: https://github.com/hansek
                    Follow me: https://twitter.com/jantezner
                    Or follow us: https://twitter.com/coexcz

                    http://www.modx.cz || http://www.coex.cz
                  • Quote from: lastoftheromans at Jan 03, 2013, 05:19 PM
                    from two weeks i use xfpc and my site really work fast! BUT i get this error in log:

                    [2013-01-03 19:18:34] (ERROR @ /index.php) [OnWebPageComplete]

                    <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/user/public_html/core/model/modx/modresponse.class.php:189) in <b>/home/user/public_html/core/cache/includes/elements/modplugin/16.include.cache.php</b> on line <b>106</b>

                    do you have some ideas?

                    I'm testing XFPC, really powerful, but I have the same error in log... did you solve it?
                    Thanks
                      TilliLab | MODX Ambassador
                      website
                      • 39426
                      • 15 Posts
                      Hi,

                      I have the same error with XFPC. Do you know how to fix?

                      In addition I realized another issue. I am using the comment Addon "Quip". When a visitor writes a new comment, the XFPC cache won't be updated. Or am I doing something wrong? I just installed XFPC, logged out and then visit all my pages. When I am writing a new comment (when I'm logged out), it won't appear. But when I'm logged in, the pages are updated and the new comments are shown. (The same with "QuipCount" comment counts on the overview pages)

                      Has anybody experience with that combination XFPC and Quip?

                      Thanks!

                      Best regards from Germany
                      Isabel