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

    I had an old version of Modx running successfully for a while. All of a sudden I started getting the below error when trying to log in to the manager (www.koggull.com/manager). I decided it was time to upgrade (thought the error might be connected with that). The upgrade seems to have been successful, my website works, but when I try to log in to the manager it is the same error again sad

    Warning: Cannot modify header information - headers already sent by (output started at /home/koggull/public_html/manager/includes/extenders/dbapi.mysql.class.inc.php:489) in /home/koggull/public_html/manager/index.php on line 144

    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/koggull/public_html/manager/includes/extenders/dbapi.mysql.class.inc.php:489) in /home/koggull/public_html/manager/includes/config.inc.php on line 59

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/koggull/public_html/manager/includes/extenders/dbapi.mysql.class.inc.php:489) in /home/koggull/public_html/manager/includes/config.inc.php on line 59

    Warning: Cannot modify header information - headers already sent by (output started at /home/koggull/public_html/manager/includes/extenders/dbapi.mysql.class.inc.php:489) in /home/koggull/public_html/manager/includes/config.inc.php on line 73


    I hope someone can help me out here, any ideas? I haven’t made any modifications apart for an "aqua" manager skin. There had been no modifications prior to the error unless my service provider did it (Siteground). Here is the server info taken from Cpanel:

    Apache version 1.3.37 (Unix)
    PHP version 5.2.5
    MySQL version 4.1.22-standard-log
    Architecture i686
    Operating system Linux (pretty sure it’s RedHat)

    Here is something I found on the Siteground support site:

    PHP Error: "Cannot modify header information"

    This is a common PHP error which is usually caused by:

    - White spaces before or after the PHP start "<?php" or end "?>" tags;

    - Various problems with the header() statement. Check carefully the code before and at the line of this statement.

    This error might be hard to troubleshoot in cases where different files are included and all of them have to be carefully expected. An easy workaround is to place a php.ini file containing the following directive:

    output_buffering = On

    This php.ini file has to be placed in the directory where the error occurs.


    I created a php.ini file like is described and put it in the manager directory, then the errors no longer appear when the page first loads, but the error comes as a javascript prompt when I hit the login button. If I close the error window and hit reload, I’m logged in to the manager with this workaround. However I’m not able to do that unless I use the php.ini file in the manager folder.

    Regards,
    - Bjarki

      • 3466
      • 9 Posts
      Never mind, my mistake tongue, I failed to overwrite the manager folder successfully during my upgrade so the old manager version was still running. The error went away after the upgrade to. 0.9.6.1p2

      - Bjarki
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I have found the best way to upgrade is to rename the folders on my local machine to manager-new, index.php-new, etc, then upload them. Once everything is uploaded, I rename all the originals to whatever-old, then rename the whatever-new items to whatever they should be. It makes the down time much less, as it’s painfully slow uploading from here, plus if you accidentally uploaded something that you had customized it’s still available in the -old folders.

        You can even use a different table prefix if you want, dump your old database and search_replace the table prefixes, use the new prefix when running the installer, thus preserving your entire original site in case of problems. Once you’re satisfied with the upgrade (I’ve never had a problem) you can delete all the old stuff.
          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
          • 3466
          • 9 Posts
          Thanks for the tip Susan,

          I will probably do it that way next time. I did read the upgrade howto in the wiki but I decided to do it the "override way". Your "re-name upgrade method" is mentioned there. For those who are using Cpanel (and do not have a remote shell access), it is a nifty way to upload a tar.gz archive to the server and extract it via the Cpanel file manager. Then the override happens really quick server side. Note, it needs to be a tar.gz archive because if you use a .zip archive the existing files are not overridden by default, but if you use tar.gz archive the existing files are automatically overridden.

          It is a pain to upload the extracted folder structure via ftp even though the size of the files aren’t that big, there is a big connection overhead for each transferred file, and they are many.

          Maybe this tip would be appropriate in the instructions wiki?

          Regards,
          - Bjarki