We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21953
    • 34 Posts
    Due to a major problem with my hosting, I had to restore the website and database from The host’s backup.

    I now get the following message at to foot of each page:

    [tt]Warning: Cannot modify header information - headers already sent by (output started at [path_to_web_root]/manager/includes/document.parser.class.inc.php:466) in [path_to_web_root]/manager/includes/document.parser.class.inc.php on line 430
    « MODx Parse Error »MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Cannot modify header information - headers already sent by (output started at [path_to_web_root]/manager/includes/document.parser.class.inc.php:466)
    Error type/ Nr.: Warning - 2
    File: [path_to_web_root]/manager/includes/document.parser.class.inc.php
    Line: 430
    Line 430 source: header($header);

    Parser timing
    MySQL: 0.0297 s s (17 Requests)
    PHP: 0.1016 s s
    Total: 0.1313 s s
    [/tt]

    Also, if I use phpMyAdmin to access some of the tables, I get a "can’t open file’ message. These are log files: log_access. log_hosts, log_operating_systems, log_referers, log_user_agents, log_visitors. eg

    [tt]Error

    SQL query:

    SHOW INDEX FROM `modx1_log_access` ;


    MySQL said:
    #1016 - Can’t open file: ’modx1_log_access.InnoDB’. (errno: 1)
    [/tt]

    What does this mean and how can it be fixed?
      • 21953
      • 34 Posts
      Oops forgot the following:

      PHP Version 4.4.2
      System Linux 2.6.9?
      My SQL Ver 4.0.26

      Browsers

      Opera 9.0 / Win NT4 SP6a
      Opera 9.01 / Win XP home SP2

      Internet Explorer 6.0 /NT4 SP6a/XP home SP2/Win98
        • 28042 ☆ A M B ☆
        • 24,524 Posts

        I would save any custom items in the /assets folder, such as images, templates, modules and snippets, via FTP, and re-install a new installation, then using the phpMyAdmin SQL panel insert the data for each table from the backup (skipping the data for the log tables, it sounds like it got badly corrupted and isn’t vital anyway), and re-upload the stuff for the assets folder. Then make and keep your own backups.

        The "cannot send header" errors are from PHP error messages getting tangled with MODx error messages.
          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
          • 21953
          • 34 Posts
          Thanks Susan. I was afraid it might come to that sad
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Not a whole lot can be done if the filesystem or the database’s filesystem gets corrupted on the server. And I learned many years ago to never trust the hosting provider’s backups. It only takes a few minutes to download your entire MODx installation’s files, and then do a simple Export from phpMyAdmin (first emptying the log tables), or use the Backup manager in MODx.
              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
              • 21953
              • 34 Posts
              The whole process was less painful than I expected. I Exported the database (minus the log files), downloaded the /assets/images and /assets/templates/custom directories, and deleted the entire database and directory structure. Then created a new database using the same database name as before, Installed MODx, uploaded the saved directories and imported the database. Everything is back as it should be. All up, around 2 hours work.

              I manage a number of sites on behalf of my customers, although this is particular one is the only MODx site at present, and the first to have less than perfect results from the hosting provider’s backups. I manage about 20 customer sites and although I back them up myself every other month or so, doing it on a more regular basis would be just too time consuming. I have provided customers with the tools to do their own backups, but most of them don’t bother. So I have depended on the hosting provider more than I probably should.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I’m happy to hear that it went well.
                  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