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

    I am getting this set of messages when I try to log into the manager on one of my sites:

    "Notice: Array to string conversion in /home/certifie/public_html/core/xpdo/xpdo.class.php on line 478

    Notice: Array to string conversion in /home/certifie/public_html/core/xpdo/xpdo.class.php on line 478

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/certifie/public_html/core/xpdo/xpdo.class.php:478) in /home/certifie/public_html/core/model/modx/modx.class.php on line 1975

    Warning: Cannot modify header information - headers already sent by (output started at /home/certifie/public_html/core/xpdo/xpdo.class.php:478) in /home/certifie/public_html/core/model/modx/modx.class.php on line 1985"

    The manager partially shows up but does not function, the site itself still works. Can anyone shed any light on what has happened and how I might fix this? I'm guessing an upgrade to 2.2.15 would be a starting point (this site uses MIGX so will not go to 2.3.1 for the time being).

    MODX 2.1.5
    PHP 5.4.31
    MySQL 5.1.68-cll

    Many thanks - Zaphodx

    This question has been answered by zaphodx. See the first response.

    [ed. note: zaphodx last edited this post 9 years, 8 months ago.]
      • 33379
      • 110 Posts
      OK. So I couldn't get 2.2.15 to upgrade but managed to get 2.2.14 to upgrade, only I did get some error messages on the last page of the installation process and now the manager doesn't show up at all, the site just goes to the home page.

      The error masseages were as follows:

      Error updating table for class sources.modMediaSource
      Array
      (
      [0] => 42S21
      [1] => 1060
      [2] => Duplicate column name 'is_stream'
      )

      Error updating table for class sources.modMediaSource
      Array
      (
      [0] => 42000
      [1] => 1061
      [2] => Duplicate key name 'is_stream'
      )

      Error updating table for class modDashboard
      Array
      (
      [0] => 42S21
      [1] => 1060
      [2] => Duplicate column name 'hide_trees'
      )

      Error updating table for class modDashboard
      Array
      (
      [0] => 42000
      [1] => 1061
      [2] => Duplicate key name 'hide_trees'
      )

      It seems there are now two duplicate column and therefore two duplicate key names. Would I be right in thinking that deleting these duplicates from the database could fix the problem? I have not done this before but I have been looking at the database in PHP MyAdmin and seem to be looking for a needle in a haystack, can anyone offer a way of finding these duplicate columns?

      Would really appreciate some input here as I am groping in the dark on this and it is an important client site.

      Many thanks - Mark
        • 3749
        • 24,544 Posts
        No, those messages are just telling you that it couldn't create the column because it's already there. Nothing to worry about.
          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
          • 33379
          • 110 Posts
          Thanks Bob, that helps a lot in that it eliminates one avenue of looking for a solution to the missing manager problem.

          Cheers - Mark
            • 3749
            • 24,544 Posts
            Make sure there is a manager directory in the MODX root directory.

            Check the paths and URLs in the core/config/config.inc.php file, especially $modx_manager_path, and $modx_manager_url.

            Check the permissions and ownership of the manager folder.

            You may need to rename the ht.access file in the manager folder to .htaccess.
              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
              • 33379
              • 110 Posts
              OK, thanks Bob, I went through your checklist as follows:

              The manager directory is present.

              Paths and urls look sound:

              if (!defined('MODX_MANAGER_PATH')) {
              
                  $modx_manager_path= '/home/certifie/public_html/manager/';
              
                  $modx_manager_url= '/manager/';
              
                  define('MODX_MANAGER_PATH', $modx_manager_path);
              
                  define('MODX_MANAGER_URL', $modx_manager_url);
              
              }


              Permissions are 775.

              I renamed ht.access to .htaccess in the manager directory, I still get the homepage but now in the browser address bar it shows this address when I try to get the manager: "http://www.domain.co.uk/index.php?q=500.shtml" (I changed the name to domain), whereas before it showed "http://www.domain.co.uk"

              Thanks again - Mark
                • 3749
                • 24,544 Posts
                I'd revert the manager .htaccess file.

                This is a pretty mysterious problem. I'd try this if you haven't already:

                Log out if you can.
                Clear your browser cache and cookies.
                Delete all files in the core/cache directory.
                Log back in.
                

                If that doesn't do it, try this longer set of steps exactly as written:

                Log out if you can.
                Go into the database in PhpMyAdmin.
                In the modx_system_settings table, change the compress_js and compress_css settings from 1 to 0.
                In that same table, change the use_friendly_urls setting from 1 to 0.
                Rename the .htaccess file in the root (if there is one).
                Delete all files in the core/cache directory.
                Clear your browser cache and cookies.
                Log back in.



                BTW, I don't think it's your problem, but there are supposed to be some .shtml files (500.shtml, 404.shtml) in the root of your site. See if they're there. If not, see if you can find them above that directory and copy them there.
                  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
                  • 33379
                  • 110 Posts
                  Hi Bob, thanks for that. Had to hit the hay around 4am so am back on the trail now.

                  So, the first suggestion didn't change anything, the second didn't get me into the manager, however, instead of getting the home page of the site I got this message:

                  "Internal Server Error

                  The server encountered an internal error or misconfiguration and was unable to complete your request.

                  Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

                  More information about this error may be available in the server error log.

                  Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

                  I guess this just means the server was unable to redirect because of the changes. I have reverted the DB settings and .htaccess name.

                  I put a test index.html file in the manager folder just to check that the manager directory was functioning properly and it is, so I guess I need to look at the "chain of events" that are required to get the manager to work from it's index.php page, not that I know what that is yet or where it might be documented. OR, I have a backup of the DB from the pre-updated 2.1.5 version of the site, so I could re-install 2.1.5 and reload the DB... If neither of those works, I could rebuild the site from scratch. I have the css, js and flat file version of the site so could probably do it in a day, it's about 40 pages on 7 templates, in the end it may be the quickest way to solve the problem...

                  Again, many thanks for your help Bob, any futher ideas or insights would be welcome smiley

                  Cheers - Mark

                    • 3749
                    • 24,544 Posts
                    One more thing to try. It could be a plugin that's running afoul of a PHP upgrade. You can go into the database and disable them all in the modx_site_plugins table (just change the 'disabled' field from 0 to 1). Delete all files in the core/cache directory after making the change.

                    If that doesn't do it, friendly URLs are off, and there's no .htaccess file in the root, I'd suspect one of these:

                    1. Some path or URL is wrong in core/config/config.inc.php or one of the three config.core.php files (root, manager, and connectors directories).

                    2. You have one or more corrupted files in your MODX install. This is fairly common if you transfer the files individually with FTP, though if the site was running OK before and you haven't upgraded it, this probably isn't the issue.

                    3. Your host has made a change that's messing things up. Sometimes severe mod_security rules can cause trouble, though that usually results in not being able to save things in the Manager.

                    SiteCheck would test all the paths and URLs in config.inc.php for you as well as the config.core.php files. It's not free, but it's handy to have around. It's a little tricky to set it up to run outside of MODX, but it will tell you for sure whether all the config files are correct.
                      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
                      • 33379
                      • 110 Posts
                      Thanks again Bob for giving this more thought. There has been a PHP upgrade on the server, however I have several other MODX sites on it that are seemingly OK. I will try the new suggestions and see what transpires.