We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29525
    • 388 Posts
    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

    include_once(dirname(__FILE__).'home/terrybar/public_html/JohnD/assets/modules/modback/settings.php');
    


    Can someone tell me what I’m doing wrong.
      www.terrybarthdesign.com
      • 29525
      • 388 Posts
      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.
        www.terrybarthdesign.com
        • 32646
        • 87 Posts
        You don’t need to modify the download.php file. It will already look in the modbak folder.

        include_once(dirname(__FILE__).'/settings.php');


        This is the original code and it works fine on my setup.
          Just learning the ropes.
          • 29525
          • 388 Posts
          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.
            www.terrybarthdesign.com
            • 32646
            • 87 Posts
            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.
              • 29525
              • 388 Posts
              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?

              Install:
              ---------
              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.
                www.terrybarthdesign.com
                • 24414
                • 45 Posts
                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.
                  • 29525
                  • 388 Posts
                  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. . . ;)
                  
                  
                    www.terrybarthdesign.com
                    • 32646
                    • 87 Posts
                    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):

                    manager/processors/execute_module.processor.php

                    and

                    assets/modules/modbak/modbak.php

                    Sorry I can’t help more.

                    Eric
                      Just learning the ropes.
                      • 29525
                      • 388 Posts
                      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.

                      http://modxcms.com/forums/index.php/topic,2794.msg148106.html

                      Thanks for all your help!

                      Terry
                        www.terrybarthdesign.com