On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I’ve just installed modbak, but when I attempt to run it, I get the following error message.

    Warning: include_once(/home/terrybar/public_html/JohnD/assets/modules/modbak/modbak.php) [function.include-once]: failed to open stream: No such file or directory in /home/terrybar/public_html/JohnD/manager/processors/execute_module.processor.php(98) : eval()'d code on line 86

    There are more errors listed but I expect they’ll be fixed when this one is.

    I’ve created a backup directory called _backup in the /public_html folder on my server

    I’ve modifed the settings.php file with the following path.

    $modx_backup_dir = $_SERVER'['DOCUMENT_ROOT']/home/terrybar/public_html/_backup';

    and the download.php file with


    Can someone tell me what I’m doing wrong.
    • Anyone? I’m dead in the water.

      I’m assuming I have a problem with how the directory is specified. I’m not sure how to express the path.
      • You don’t need to modify the download.php file. It will already look in the modbak folder.


        This is the original code and it works fine on my setup.
          Just learning the ropes.
        • Word cooper, thank for you help.

          I restored the original download.php file and tried to run modback again. I still get the same errors.

          Is this the correct way to modify the settings file? Is this how the path should be specified? Is the syntax correct? Do I need the full path? I’ve tried variations but no luck.

          $modx_backup_dir = $_SERVER[’DOCUMENT_ROOT’].’/home/terrybar/public_html/_backup/’;

          Thank you.
          • It looks OK. This is basically my line:

            $modx_backup_dir = $_SERVER['DOCUMENT_ROOT'].'/home/httpd/website/html/manager/data/';

            I would try it without the underscore. Maybe that is causing problems. Obviously, you also need to rename the folder, too. smiley

              Just learning the ropes.
            • Word cooper

              I removed the underscore on the folder and in the settings file. No change.

              You indicated the settings.php file need not be changed? What about step 3 in the instructions?

              1. Create a directory on your webserver to hold modx .zip archives (ie /home/username/_backup ) and set read/write permissions to 777
              2. Unzip modbak directory under /assets/modules/ directory. --> /assets/modules/modbak
              3. Edit /assets/modules/modbak/settings.php, and set $modx_backup_dir to backup dir in new directory created in (1)
              4. Create a new Module in MODx manager and copy contents of modBak.module.tpl into module code.
              5. Now run module, click generate, if it works there should be a .zip link containing your modx site.
              • I think you may need to modify the reference to the backup directory in the module itself too.

                Edit the module code in the manager @ Modules>Manage Modules>Modbak. It’s somewhere around line 40.
                • Thanks Ram

                  Yes, that was already modified:

                  // directory to contain zipped archives, default is servers document root, not secure
                  $modx_backup_dir = $_SERVER['DOCUMENT_ROOT'].'/backup/';
                  Any other suggestions?  I know this shouldn't be this hard. . . ;)
                  • The only thing I can think of, being a PHP newbie, is to make sure the files mentioned are wher they should be and have the proper permissions (0644):




                    Sorry I can’t help more.

                      Just learning the ropes.
                    • Well, Thanks to wordcooper’s suggestion, I finally have the installation working. Thank you so much!

                      I uninstalled Modbak entirely. Deleted my local copies of the code. Downloaded a new file and reinstalled on the server. Finally, the installation is working!! Yeah!

                      Now I’m getting memory errors when I run it. I’ve truncated the event logs but the problem persists. I’ve posted this issue on another topic related to this problem.


                      Thanks for all your help!