We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17412
    • 270 Posts
    A client’s just site went offline unexpectedly due to what appears to be a bug in the siteCache.idx.php

    modx, Parse error: syntax error, unexpected $end in, siteCache.idx.php

    The end of the file:

    */
    
    $hideFolders = isset($hideFolders)? $hideFolders : 0;
    /*
    	Param:


    Missing a closing php tag though if I add this I still to get the same error.

    I found a previous backup of sideCache.idx.php and made a few edits until I could get the site back online. This is just a temporary fix. I’m now getting errors in the manager:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Can’t open file: ’modx_manager_log.MYI’ (errno: 145) »
    SQL: INSERT INTO `nameofdb`.`modx_manager_log` (timestamp, internalKey, username, action, itemid, itemname, message) VALUES(’1185555778’, ’1’, ’broadmin’, ’26’, ’-’, ’-’, ’Refreshing site’)

    What does one do in such circumstances? Uploading a blank cache file ain’t happening :0

    Cheers.
      • 17412
      • 270 Posts
      Sorry to bump. Just wondering if anybody could lend a hand here? Client will be panicking come tomorrow smiley

      Cheers.
        • 33337
        • 3,975 Posts
        go into manager, empty the logs... then refresh the site.
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • 17412
          • 270 Posts
          Hi Zi, do you mean Clear Cache?

          If so, I get this error when I try that:

          0 documents were published.
          0 documents were unpublished.
          Cache: Found 3 files in cache directory and deleted 0 cache files.

          New cache files will be created when pages are requested.
          « MODx Parse Error »
          MODx encountered the following error while attempting to parse the requested resource:
          « Execution of a query to the database failed - Can’t open file: ’modx_manager_log.MYI’ (errno: 145) »
          SQL: INSERT INTO `db-name`.`modx_manager_log` (timestamp, internalKey, username, action, itemid, itemname, message) VALUES(’1185722215’, ’1’, ’broadmin’, ’26’, ’-’, ’-’, ’Refreshing site’)
          [Copy SQL to ClipBoard]

          And there is no change.
            • 33337
            • 3,975 Posts
            From that error, it seems it cannot find the db table named "modx_manager_log" ... if u have phpmyadmin access, login and see there if it exists. If it exists there, the "repair" it.

            This is mostly db corruption issue, i think ur host has updated or changed something...

            Hope the above will help you.
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 17412
              • 270 Posts
              modx_manager_log is there and I cannot see any corruption as such.
              Would it be safe to delete the table and then re-create it as a blank table?

              There are approx 3000 lines or so in this table, eg:

              INSERT INTO `modx_manager_log` (`id`, `timestamp`, `internalKey`, `username`, `action`, `itemid`, `itemname`, `message`) VALUES (1, 1150634252, 1, 'admin', 58, '-', 'MODx', 'Logged in'),
              (2, 1150634262, 1, 'admin', 17, '-', '-', 'Editing settings'),
              (3, 1150634460, 1, 'admin', 3, '1', 'Home', 'Viewing data for document 1'),
              (4, 1150634489, 1, 'admin', 76, '-', '-', 'Reource management'),
              (5, 1150634518, 1, 'admin', 19, '-', 'New template', 'Creating a new template'),
              (6, 1150634552, 1, 'admin', 20, '-', '-', 'Saving template -'),
              (7, 1150634552, 1, 'admin', 76, '-', '-', 'Reource management'),
              (8, 1150634556, 1, 'admin', 3, '1', 'Home', 'Viewing data for document 1'),
              (9, 1150634563, 1, 'admin', 27, '1', '-', 'Editing document 1'),
              (10, 1150634840, 1, 'admin', 27, '1', '-', 'Editing document 1'),
              (11, 1150634846, 1, 'admin', 5, '1', '-', 'Saving document 1'),
              
              etc
                • 33337
                • 3,975 Posts
                When you login to the manager, in Reports -> Manager Actions, it has empty logs link. Use it its safer than doing it from phpmyadmin imo.
                  Zaigham R - MODX Professional | Skype | Email | Twitter

                  Digging the interwebs for #MODX gems and bringing it to you. modx.link
                  • 17412
                  • 270 Posts
                  I couldn’t find a link in Reports > Manager Actions
                  I did find a Clear Log link in System Events which clicked - this wiped out all messages and one more was produced :0

                  Parser - System Events
                  Error
                  
                  « MODx Parse Error »
                  MODx encountered the following error while attempting to parse the requested resource:
                  « Execution of a query to the database failed - Can't open file: 'modx_manager_log.MYI' (errno: 145) »
                        SQL: INSERT INTO `dbname`.`modx_manager_log` (timestamp, internalKey, username, action, itemid, itemname, message) VALUES('1185727769', '1', 'broadmin', '13', '-', '-', 'Viewing logging')
                        [Copy SQL to ClipBoard] [It's All Text!]
                   
                    • 33337
                    • 3,975 Posts
                    Sorry, I am clueless then tongue ... I’ll let more experience users shed some light on this.
                      Zaigham R - MODX Professional | Skype | Email | Twitter

                      Digging the interwebs for #MODX gems and bringing it to you. modx.link
                      • 17412
                      • 270 Posts
                      no worries smiley thanks for giving it a shot!!