We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47717
    • 144 Posts
    hi everybody,

    My site works great on Modx evolution 2.4.4-pl.

    I am feeling very insecure, as my Modx report is full of errors :

    [2016-06-14 10:00:43] (ERROR @ /home/deb57431n8/domains/my-awesome-site.be/public_html/core/cache/includes/elements/modplugin/11.include.cache.php : 101) PHP warning: Cannot modify header information - headers already sent by (output started at /home/deb57431n8/domains/my-awesome-site.be/public_html/core/model/modx/modresponse.class.php:189)


    I have an attachment with the plugins I installed, I have the awesome "XFPC" caching plugin installed that gives instantly 15 times faster website loads !

    Can anybody find out why this occurs ?

    regards
      • 22840
      • 1,572 Posts
      What plugin has the id 11 ? you can get this by editing the file core/cache/includes/elements/modplugin/11.include.cache.php and looking at the end of line 2
        • 47717
        • 144 Posts
        Quote from: paulp at Jun 14, 2016, 07:56 AM
        What plugin has the id 11 ? you can get this by editing the file core/cache/includes/elements/modplugin/11.include.cache.php and looking at the end of line 2

        Hi Paulp,

        Great tip.

        I looked into it, and ID 11 is the caching plugin "XFPC"

        I opened the
        domains/my-awesome-site.be/public_html/core/cache/includes/elements/modplugin/11.include.cache.php : 101
        

        and I have highlighted line 101, as is shown in the php error:

        // Don't execute in manager past this point
        if ($modx->context->get('key') == 'mgr') {
         	return; 
        }
        
        [u][b]header ('X-XFPC-Cache-Active: Yes');[/b][/u]
        
        $cache = true;
        $refreshCache = false;
        
        // If posting, don't cache
        if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
          // Don't cache and remove cached file
          $cache = false;
          $refreshCache = true;
        }
          • 47717
          • 144 Posts
          Quote from: sriananda at Jun 14, 2016, 08:38 AM
          Quote from: paulp at Jun 14, 2016, 07:56 AM
          What plugin has the id 11 ? you can get this by editing the file core/cache/includes/elements/modplugin/11.include.cache.php and looking at the end of line 2

          Hi Paulp,

          Great tip.

          I looked into it, and ID 11 is the caching plugin "XFPC"

          I opened the
          domains/my-awesome-site.be/public_html/core/cache/includes/elements/modplugin/11.include.cache.php : 101
          

          and the "error-line 101" is here now located at line 6, as is shown in the php error:

          // Don't execute in manager past this point
          if ($modx->context->get('key') == 'mgr') {
           	return; 
          }
          
          header ('X-XFPC-Cache-Active: Yes');
          
          $cache = true;
          $refreshCache = false;
          
          // If posting, don't cache
          if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
            // Don't cache and remove cached file
            $cache = false;
            $refreshCache = true;
          }