We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15152
    • 360 Posts
    I have uploaded Evo 1.4 to a new site (just started working on it) and I am getting the following error. This is the second time I’ve had this problem (same error message) and I’m getting worried. Anyone have any ideas?

    Warning: Cannot modify header information - headers already sent by (output started at /home/madisonm/public_html/manager/includes/header.inc.php:7) in /home/madisonm/public_html/manager/includes/document.parser.class.inc.php on line 2732
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Out of memory (Needed 2096080 bytes) »
    SQL: SELECT `madisonm_littlebit`.`modx_site_templates`.templatename as name, `madisonm_littlebit`.`modx_site_templates`.id, `madisonm_littlebit`.`modx_site_templates`.description, `madisonm_littlebit`.`modx_site_templates`.locked, if(isnull(`madisonm_littlebit`.`modx_categories`.category),’uncategorized’,`madisonm_littlebit`.`modx_categories`.category) as category FROM `madisonm_littlebit`.`modx_site_templates` left join `madisonm_littlebit`.`modx_categories` on `madisonm_littlebit`.`modx_site_templates`.category = `madisonm_littlebit`.`modx_categories`.id ORDER BY 5,1
      There are no boring projects. Only boring executions. ~ Etzkorn
      www.impress-design.com
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I started getting those when I hosted a third client’s site on my VPS and had to upgrade my hosting plan.
        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
        • 15152
        • 360 Posts
        Thanks, Susan. I think I’m going to have to do it. I only have about 25 sites on the vps!

        Hey, thanks for mentioning me in your blog! You can download the eBook now: http://modxcms.com/forums/index.php/topic,51820.0.html
          There are no boring projects. Only boring executions. ~ Etzkorn
          www.impress-design.com
          • 15152
          • 360 Posts
          Interesting - this was in the Hostgator help section and it looks like a MODx issue:

          From Hostgator

          PHP Cannot modify header information

          Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/test.php:3) in /home/user/public_html/test.php on line 4
          Look familiar? This PHP error has haunted website owners for years. Please understand, HostGator does not normally support your webdesign and coding, but this error is too common for us to ignore. So, one of our PHP experts has the answer for you.

          The problem you face is that you are trying to use the PHP header function, header(), but there can be absolutely no HTML output before this function is declared. Let’s use some examples:

          <!DOCTYPE "HTML 4.01 Transitional EN" "http://www.w3.org/">
          <html><body>
          <?php header (’Location: http://hostgator.com/’); ?>
          </body>
          </html>
          This is incorrect coding. You cannot have any HTML preceding the header function. A few more bad examples:
          <?php
          echo "Task complete.";
          header (’Location: http://hostgator.com/’);
          ?>
          Task complete! <?php
          header (’Location: http://hostgator.com/’);
          ?>
          This is incorrect coding for the same reason. You cannot have any text output before the header function. Plain text is always treated as HTML by your browser. One more bad example:
          <?php
          header (’Location: http://hostgator.com/’);
          ?>
          This one is tricky. The blank space before the PHP tag counts as HTML output.
          It is acceptable to have other PHP code before the header function, as long as nothing is outputted as HTML. This is a correct example:
          <?php
          $variable = "value";
          mysql_query("blah blah");
          header (’Location: http://hostgator.com/’);
          ?>
            There are no boring projects. Only boring executions. ~ Etzkorn
            www.impress-design.com
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Yes, that’s not the problem. All those errors are caused by MODx and PHP error reporting getting in each other’s way. The problem is what’s causing the error that both MODx and PHP are trying to report at the same time; and that’s the out of memory error. You soon enough learn to ignore those can’t-send-header error messages and winnow out the actual original error.
              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
              • 15152
              • 360 Posts
              Ok Susan. Now, how can it be fixed?

              Also, I’ve also come across this today (see image).

                There are no boring projects. Only boring executions. ~ Etzkorn
                www.impress-design.com
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I suspect it’s the same problem, an overloaded server. If the database is overloaded it won’t return whatever was asked for, and those errors will be thrown when there’s no data to work with. The out-of-memory error is also due to overloaded server conditions.

                I ran across this once with my original minimal VPS and had to upgrade my VPS hosting plan to the next level, giving me more memory and space to work with (I had hosted a friend’s site on my VPS and when we were both working in our respective managers at the same time it was exceeding my minimal plan’s limits).
                  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