We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40939
    • 2 Posts
    Hi all, I hope you can help me, I'm getting a little stressed! I started having problems with my MODx site after my hosting company upgraded from PHP 5.2 to 5.3.14.

    I tried to make some edits to a page and it was trashed with backslashes. Some head-scratching and googling later I found out it was the 'magic quotes' issue. I sent the necessary info to the hosting company who added a php.ini file and made changes to .htaccess. I've looked on the server, and it looks like these are the only files that changed.

    Now when I try to log in to the manager I get a couple of errors. The first is warning me about the timezone not being set. I googled and found the solution to this one, and I don't think that's what's stopping me logging in.

    It think the main culprit is:

    Warning: Cannot modify header information - headers already sent by (output started at /home/inmyg3/public_html/manager/includes/document.parser.class.inc.php:801) in /home/inmyg3/public_html/manager/processors/login.processor.php on line 258
    


    I've searched but can't find a solution. I found a couple of posts saying it could be 'whitespace before the <? php in config.inc.php'. I tracked down the file on my server, but it looked ok, and also checked the two files in the error for good measure - no whitespace at the start of those either.

    My MODx website was installed for me by a web designer (who unfortunately is away at the moment). I'm reasonable technical (a developer) and know pretty much nothing about MODx, so please be gentle with me smiley. Any suggestions gratefully received.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That warning is because an error or warning was sent by MODx and PHP together, and one of them already sent the headers to the server for the error page, so the second one complains about the headers already being sent. Make sure the timezone setting problem is taken care of, then manually clear the cache if necessary. (use an FTP client or your domain control panel to actually delete all the folders inside the core/cache folder).
        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
        • 40939
        • 2 Posts
        Thanks for you help Susan. I fixed the timezone problem and I can log in again now without getting any errors. I don't know how many times I've told newbie coders to fix the first error before worrying about the second - I guess I should take my own advice more often smiley.

        I couldn't find the core/cache folder, but luckily it seems the cache didn't need clearing to solve the problem.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Well, when you understand why it's making that "headers already sent" error, you realize you can just ignore it. It's just MODx and PHP squabbling over who gets to send you the error message about the actual PHP 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
            • 20549
            • 29 Posts
            I am having a similar error after upgrading to PHP 5.3.14 and Evo 1.0.6.

            I usually have to refresh the manager one to three times to finally get it to display fully.

            The bad result is always inconsistent. The manager loads the header tabs, main body and doc tree separately. Sometimes one of those three areas loads an internal sever error message, other times they'll attempt to load the main website, sometimes its just blank.

            Nothing is broken after a couple reload attempts, but it is really disconcerting to see that odd behavior.

            Also noticed on this new version of php that the escape /'s came back with a vengeance. Had to create my own php.ini file to fix magic quotes to off and used this nifty little htaccess fix to push the ini to all directories:
            <IfModule mod_suphp.c>
            suPHP_ConfigPath /home/spfishmg/public_html
            </IfModule>
            <Files php.ini>
            order allow,deny
            deny from all
            </Files>

            I'd love to know (as a php illiterate) what suggestions to look for in order to remove this inconsistent behavior from the manager? [ed. note: mtbinary last edited this post 14 years, 2 months ago.]
              • 20549
              • 29 Posts
              Here is a new result given when nothing loads right:

              Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/spfishmg/public_html/manager/includes/user_settings.inc.php on line 18

              Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/spfishmg/public_html/manager/includes/user_settings.inc.php on line 20

              Warning: Cannot modify header information - headers already sent by (output started at /home/spfishmg/public_html/manager/includes/user_settings.inc.php:18 ) in /home/spfishmg/public_html/manager/index.php on line 150
                • 3749
                • 24,544 Posts
                The first thing to try is turning off the compress_js and compress_cs System Settings. If you can't do it in the Manager, they are in the modx_system_settings table in the DB (use PhpMyAdmin and change the 1 to a 0).

                Then delete all files in the core/cache directory and clear your browser cache and cookies.


                Another thing to try is turning off E_NOTICE and E_DEPRECATED error reporting. I suspect that the "headers already sent" issue is caused by one of those.


                ------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using.
                MODX info for everyone: http://bobsguides.com/modx.html
                  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
                  • 21395
                  • 91 Posts
                  Quote from: mtbinary at Aug 23, 2012, 09:13 AM
                  Here is a new result given when nothing loads right:

                  Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/spfishmg/public_html/manager/includes/user_settings.inc.php on line 18

                  Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/spfishmg/public_html/manager/includes/user_settings.inc.php on line 20

                  Warning: Cannot modify header information - headers already sent by (output started at /home/spfishmg/public_html/manager/includes/user_settings.inc.php:18 ) in /home/spfishmg/public_html/manager/index.php on line 150

                  I have precisely the same result after my hosting company upgraded their servers to PHP 5.3.26 and MySQL 5.5.30. All my sites on the same server are apparently affected.

                  The message appears after I've logged-on and when I try to edit and save a resource.

                  I upgraded one of the sites to Evo 1.0.10 from 1.0.8 to see if that would help. It didn't.

                  Did you find a solution to your problem of 10 months ago? Bob's reply assumed you were using Revo, I think...


                  Nic Boyde
                    MODX Revolution 2.6.5-pl (traditional)

                    Hosted on MODX Cloud

                    Skype: nicbaldeagle
                    • 20549
                    • 29 Posts
                    Quote from: nicboyde at Jul 17, 2013, 11:10 AM
                    I have precisely the same result after my hosting company upgraded their servers to PHP 5.3.26 and MySQL 5.5.30. All my sites on the same server are apparently affected.

                    The message appears after I've logged-on and when I try to edit and save a resource.

                    I upgraded one of the sites to Evo 1.0.10 from 1.0.8 to see if that would help. It didn't.

                    Did you find a solution to your problem of 10 months ago? Bob's reply assumed you were using Revo, I think...
                    Nic - I gave up on my hosting company (LiquidWeb) and changed to Bluehost. I never did figure out what the issue was, but it is clearly a problem with the php.ini/config. If on a shared server, your host company simply won't make needed changes. (I wouldn't use .htaccess to modify your .ini either. That has never been successful for me.)

                    Go here: http://rtfm.modx.com/display/revolution20/Server+Requirements

                    Copy the requirements and ask your hosting company to put you on a server that matches it. If not, find a new host. And when setting up your new account, be sure to supply that info so you get a compatible server.

                    Good luck! I understand your pain!

                      • 3749
                      • 24,544 Posts
                      I've always had really good luck with MODX at Bluehost: http://bit.ly/Hb5CAY
                        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