We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27108
    • 13 Posts
    Hi, if anyone can help it is greatly appreciated. I was editing a template variable and now get an error message when trying to view my site. I am also unable to log in to the manager now. shocked Here are the error messages I get--the first is the error on the page (cupe3908.org), the second set of messages is on the manager login. Thanks.

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Invalid argument supplied for foreach()
    Error type/ Nr.: Warning - 2
    File: /home/httpd/vhosts/cupe3908.org/httpdocs/manager/includes/document.parser.class.inc.php
    Line: 1210
    Line 1210 source: foreach ($this->documentMap as $mapEntry) {

    Parser timing
    MySQL: 0.0199 s (11 Requests)
    PHP: 0.1142 s
    Total: 0.1341 s

    Errors on login page:
    Parse error: parse error in /home/httpd/vhosts/cupe3908.org/httpdocs/assets/cache/siteCache.idx.php on line 6265

    Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/cupe3908.org/httpdocs/assets/cache/siteCache.idx.php:6265) in /home/httpd/vhosts/cupe3908.org/httpdocs/manager/index.php on line 148

    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/httpd/vhosts/cupe3908.org/httpdocs/assets/cache/siteCache.idx.php:6265) in /home/httpd/vhosts/cupe3908.org/httpdocs/manager/includes/config.inc.php on line 60

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/httpd/vhosts/cupe3908.org/httpdocs/assets/cache/siteCache.idx.php:6265) in /home/httpd/vhosts/cupe3908.org/httpdocs/manager/includes/config.inc.php on line 60

    Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/cupe3908.org/httpdocs/assets/cache/siteCache.idx.php:6265) in /home/httpd/vhosts/cupe3908.org/httpdocs/manager/includes/config.inc.php on line 74
      • 27108
      • 13 Posts
      Something more--when I look at the sitecache.idx.php file, it ends abruptly partway through the line where the error occurs (6265). Here are the last few lines. Anyone know what I am missing or how to rebuild this file? Thanks

      $e = &$this->pluginEvent;
      $e[’OnBeforeManagerLogin’] = array(’Forgot Manager Login’);
      $e[’OnChunkFormRender’] = array(’Bottom Button Bar’);
      $e[’OnDocFormPrerender’] = array(’Inherit Parent Template’);
      $e[’OnDocFormRender’] = array(’Image TV Preview’,’Bottom Button Bar’);
      $e[’O
        • 15082
        • 195 Posts
        Try to re-upload the corrupted file from the appropriate download package.
        If this alone doesn’t help, try uploading the installer too and run the setup in update mode without installing the demo content.

        Greetz
        JUSI
          • 27108
          • 13 Posts
          Thank-you, I am trying that...the odd thing is that my cache file now shows as being size 0 (it was 250k), and I can’t overwrite it with FTP, nor can I cut and paste content into it (it won’t save--error message (in Plesk) is "No space left on device filemng: Error occured during /bin/cp command"). I don’t know much about permissions, so I just set it to 777 in case that was the problem, but still cannot seem to edit this file. I’ve tried renaming it, and then uploading the new file, but when I look at the new file, it has no content.
            • 15082
            • 195 Posts
            The new file can be blank. Or with just the PHP open and close tags ([tt]<?php ?>[/tt]).

            The file should be writable for the webserver, so setting it to 777 should be OK.

            Try to login to the manager, if it’s still impossible, try running the installer.

            Greetz
            JUSI
              • 27108
              • 13 Posts
              Thanks for your help. The new file is blank. I tried to edit it in Plesk to put in the php open and close tags, but I keep getting the error message that there is no more storage on the device.

              I still cannot log in to manager. Other errors were occurring with the document parser (I posted the message in the original post), so I tried to ftp the original file (exactly same size, so probably identical), but no luck, and in the process the documentparser.class.inc.php file lost all of its content--became size 0. So, since I couldn’t ftp it, I tried to edit it in Plesk, copying and pasting from the original. But, as with the sitecache file, I got the error message about the device being full.

              So, now the site is completely non-functional. Before that I tried running the installer but also got error messages.

              As you can tell, I am a complete amateur, so at this point I am going to try calling my host to see if they have a backup (the backup function in Plesk is disabled for me, so I am hoping this means the host manages it!).

              Thanks again, please let me know if you have any further thoughts, I will post the results of my call to tech support.
                • 3749
                • 24,544 Posts
                Before trying to restore, ask the host to check if the drive is actually full. You may just be out of drive space at the host. If so, once that’s fixed the solutions above will probably work
                  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
                  • 27108
                  • 13 Posts
                  Thank-you, I will do that, but at least according to Plesk I have 1.2GB free. Whether using FTP (Filezilla) or the Plesk control panel, I get the error that there is no space left on device. When I FTP, even if I am sending a file that does not exist on the remote server, I get a message telling me that a file with that name exists, with file size 0 kb, and asking me whether I want to overwrite. I can’t overwrite, but even if I choose cancel, an empty file is created on the host. In other words, a file with the same name as the one I want to upload, but with no content.

                  So, when I have tried to re-upload the sitecache and documentparser, they have been replaced by empty files--non-existent document parser means that my site now shows a fatal error to visitors...

                  I will see if the host can correct this problem and allow me to upload files before I get them to restore.

                  Again, thanks for the suggestions--even though it is not yet fixed, the offers of help are bringing my stress levels down!
                    • 27108
                    • 13 Posts
                    Well, the host seems to be saying there isn’t anything they can do, they do not store backups and aren’t sure what might be causing the error. They are telling me I probably have to re-upload the whole site, since I can’t upload files to it. I guess this means I should delete everything in the root directory?

                    I will look for more info on how to do this in the forum. Embarrassingly, I have not properly backed up the site--I just used the modx backup function every so often, but now I get the sense that this doesn’t back up the whole site...does it back up the database?

                    *sigh*

                    Thanks again to both of you for your help.
                    Stephen.
                      • 3749
                      • 24,544 Posts
                      Wait!! I don’t think you’ve really lost any of your content. Before you delete anything, try to download all the files at the site using FTP and put them somewhere safe.

                      Then use PhpMyAdmin to dump your current MODx database to a local file. Almost everything should still be in there and that’s where your content is.

                      If you can’t FTP files up to the site and the permissions are ok on the directory, something is seriously wrong that is not your fault. Your host should fix it. I’d also consider changing hosts.

                        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