We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25969
    • 118 Posts
    I’ve been developing a website in MODx for the last few weeks without issue but yesterday it hit a problem. I was saving off a new snippet and it came back with a bad bad PHP error complaining about the siteCache.idx.php file. So I checked the file out down to the line it complained about and the file abruptly stopped mid sentence, nnot cosing off the PHP block (about 5000 lines down). It seemed to be a file that could be regenerated from the DB so I just renamed the file to siteCache.idx.old.php then created a new blank one. That didn’t seem to work so I tried a few other things with the file and eventually got MODx ticking along again.

    Anyway, today it was working for a couple hours but has stopped working again with a seemingly different issue out of the blue. Initially the whole site wouldn’t work, just blank pages in the front end, and going to manager would only return a load of PHP warnings -
    Warning: fopen(/home/www/domain.com/web/manager/media/style//login.html) [function.fopen]: failed to open stream: No such file or directory in /home/www/domain.com/web/manager/includes/accesscontrol.inc.php on line 129
    
    Warning: filesize() [function.filesize]: stat failed for /home/www/domain.com/web/manager/media/style//login.html in /home/www/web56/web/manager/includes/accesscontrol.inc.php on line 130
    
    Warning: fread(): supplied argument is not a valid stream resource in /home/www/domain.com/web/manager/includes/accesscontrol.inc.php on line 130
    
    Warning: fclose(): supplied argument is not a valid stream resource in /home/www/domain.com/web/manager/includes/accesscontrol.inc.php on line 131


    But 10 mins later the warnings disappeared, without any changes being made, and it started saying only "Not Logged In!". And I haven’t been able to fix this in any way. Anyone know what I can do?
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: sal at Sep 25, 2008, 06:50 PM

      I was saving off a new snippet and it came back with a bad bad PHP error complaining about the siteCache.idx.php file. So I checked the file out down to the line it complained about and the file abruptly stopped mid sentence, nnot cosing off the PHP block (about 5000 lines down).
      Can you elaborate on what this bad PHP error was? Have you deleted this snippet from the database? Your best bet is to reupload the install directory and run the upgrade install to rebuild the cache file properly, but this won’t work if the snippet you saved causes the same problem.
        • 25969
        • 118 Posts
        Quote from: OpenGeek at Sep 25, 2008, 08:32 PM

        Can you elaborate on what this bad PHP error was?
        No, I skipped past it too quickly and didn’t take note. However I just went through an upgrade to regenerate a new siteCache file. It seemed a great success (went through OK) but after "upgrading successfully", the front end is only a "Install now?" message (the config file is where it should be, the "install" directory is removed) and the manager page only comes back with the following PHP warnings -

        Warning: DocumentParser::include_once(MODX_BASE_PATHmanager/includes/extenders/dbapi..class.inc.php) [documentparser.include-once]: failed to open stream: No such file or directory in /home/www/web56/web/manager/includes/document.parser.class.inc.php on line 39
        
        Warning: DocumentParser::include_once() [function.include]: Failed opening 'MODX_BASE_PATHmanager/includes/extenders/dbapi..class.inc.php' for inclusion (include_path='/home/www/web56/web/manager/includes/') in /home/www/web56/web/manager/includes/document.parser.class.inc.php on line 39
        Could not load DBAPI class.
          • 22303 MODX Staff
          • 10,725 Posts
          Something’s definitely wrong with your manager/includes/config.inc.php file. Check that file to make sure it exists, has valid PHP content, and is readable by the web server. In addition, it has to writable during the install, but the fact that the installation completed without warning should indicate that the permissions are ok. I’m stumped.

          Perhaps you should post some more details of your server configuration to help us narrow down the problem.
            • 3749
            • 24,544 Posts
            In your manager/includes/config.inc.php, (if it’s not trashed completely) look particularly at the line that defines MODX_BASE_PATH.

            Look also at manager/includes/document.parser.class.inc.php line 39

            it should look exactly like this:

            if (!include_once MODX_BASE_PATH . 'manager/includes/extenders/dbapi.' . $database_type . '.class.inc.php')

              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
              • 25969
              • 118 Posts
              The config.in.php file is empty (aargh), how much bad news is that? So I’m back to a blank frontend and a "Not Logged In!" backend, is it cool if I just copy and update a config.inc.php file from another install?
                • 25663 MODX Staff
                • 12,272 Posts
                That should work sal. Pay extra care to your db connection details.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 25969
                  • 118 Posts
                  Awesome, almost there. The frontend is all working now as it should but the backend "/manager" is still only returning "Not Logged In!". Any last pearls of wisdom to get over the last hurdle?

                  I discovered things started to go wrong because I hit a diskspace limit I was unaware of. Anyway, the limit has been removed and I’m unsure what else I might need to rehash because of this. As I said earlier, I was saving a new snippet which I’ve looked in the DB and seen hasn’t made it in (no biggy) so that’s why the siteCache file couldn’t regenerate itself.
                    • 25969
                    • 118 Posts
                    I read another thread that talked about missing files in the manager directory which was really weird but two somehow went AWOL. Uploaded the 2 missing files and things are back to normal. All sorted.
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Sometimes your friendly FTP client will hiccup when uploading bunches of files at once. I’ve had it happen a few times; especially when my local ISP is having a bad connection day and the packets are dropping like flies.
                        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