Results 1 to 10 of 286

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Location
    Sydney Australia
    Posts
    829
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Skip,

    Here is the new error message:

    Notice: Undefined index: name in /home/content/o/u/t/outdoorking/html/koala/backup_zc.php on line 403

    Notice: Use of undefined constant BACKUP_EXCLUDED - assumed 'BACKUP_EXCLUDED' in /home/content/o/u/t/outdoorking/html/admin/backup_zc.php on line 413

    Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getSize() [<a href='splfileinfo.getsize'>splfileinfo.getsize</a>]: stat failed for /home/content/o/u/t/outdoorking/html/stats/error_logs' in /home/content/o/u/t/outdoorking/html/admin/backup_zc.php:51 Stack trace: #0 /home/content/o/u/t/outdoorking/html/admin/backup_zc.php(51): SplFileInfo->getSize() #1 /home/content/o/u/t/outdoorking/html/admin/backup_zc.php(413): directorySize('/home/content/o...') #2 {main} thrown in /home/content/o/u/t/outdoorking/html/admin/backup_zc.php on line 51

    I changed as per your instructions and the above is the error message that I am getting.

    Below is what is in the file after the change:

    <?php
    /*
    ***********************************************************************
    $Id: backup_zconfig.php, v 1.0.5 2010/24/09

    ZenCart 1.3.9f
    Copyright 2003-2010 Zen Cart Development Team
    Portions Copyright 2004 osCommerce
    http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

    Written By SkipWater <[email protected]> 05.08.10

    ***********************************************************************
    */
    require(DIR_WS_CLASSES . 'archive.php'); // Load Archive class file
    require(DIR_WS_CLASSES . 'mysql_db_backup.class.php'); // Load MySQL DB Backup class file
    define(TEXT_ZCS_BACKUP_VERSION,'Version 1.0.5');
    define(FILENAME_ZC_DOWNLOAD, 'backup_zc_download.php');
    $zc_directory = DIR_FS_CATALOG; // Used for zen cart site size
    $zc_directory_base_count = strlen(DIR_FS_CATALOG);

    // ***********************************************************************
    // Grab a large chunk of memory
    // If your server allows this adjustment then adjust to meet your needs.
    // ***********************************************************************
    // ini_set("memory_limit","128M");
    // ini_set("memory_limit","192M");
    // ini_set("memory_limit","256M");
    ini_set("memory_limit","512M"); // default
    // ini_set("memory_limit","768M");
    // ini_set("memory_limit","1000M");

    // ***********************************************************************
    // Note each directroy or file name must be surrounded with double quotes
    // and a single comma with no space separating each.
    // DIR_FS_CATALOG = Zen Carts root files system path you must use this and
    // just add the directory you want excluded.
    // Rember that directories names are case sensitive!
    // ***********************************************************************
    /* Sample Exclude
    $exclude_files = array("".DIR_FS_CATALOG."cache",
    "".DIR_FS_CATALOG."pub",
    "".DIR_FS_CATALOG."admin",
    "".DIR_FS_CATALOG."download"
    );

    */
    // ***********************************************************************
    // Set default exclude directories
    // ***********************************************************************
    $exclude_files = array("".DIR_FS_CATALOG."cache",
    "".DIR_FS_CATALOG."extras",
    "".DIR_FS_CATALOG."pub",
    "".DIR_FS_CATALOG."stats"
    );

    // ***********************************************************************
    // Default Setting
    // These are the settings that are used when you first request backup zc
    // You can edit them if you understand them.
    // ***********************************************************************
    $file_name = $_SERVER['HTTP_HOST'].'_'.date("mdY-Hi"); // Create File Name
    $file_ext = '.zip'; // Zip File Extention default
    $archive_type = 'zip_file'; // Set as default
    $file_location = DIR_FS_SQL_CACHE."/"; // Set cache directory as default
    $base_directory = '.'; // Set ZC root as default
    $compress_level = 3; // 1-9 1 lowest 9 highest only works with zip file
    $recurse_dir = 1; // 1 = true 0 = false
    $backup_file_type = '0'; // 0 = zip 1 = gzip 2 = tar
    $download_backup = 0; // 1 = true 0 = false

    // ***********************************************************************
    // SQL Data Base info
    // ***********************************************************************
    $sql_path = DIR_FS_ADMIN.'backups/'; // path to SQL file default
    $sql_file_name = $_SERVER['HTTP_HOST'].'_'.date("mdY-Hi").'.sql'; // Create SQL File Name

    ?>
    Outdoorking
    Live Site www.outdoorking.com.au

  2. #2
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: BackUp ZC [Support Thread]

    Due to Go Daddy I have rewritten the function directorySize I can not test it because I do not have access to a Go Daddy account. So you will have to try it out.
    Find the file YOUR_ADMIN/backup_zc.php replace the directorySize function about line 40.
    PHP Code:
        // Get the size of the web site
        
    function directorySize($zc_directory)
        {
            
    $zc_size 0;
            foreach(new 
    RecursiveIteratorIterator(new RecursiveDirectoryIterator($zc_directory)) as $file)
            {
            
    $zc_size += $file->getSize();
            }
            return 
    $zc_size;
        } 
    With this directorySize function
    PHP Code:
    // GoDaddy work around
    function directorySize($zc_directory)
    {
      
    $zc_size 0;
      if (
    $handle opendir ($zc_directory))
      {
        while (
    false !== ($file readdir($handle)))
        {
          
    $nextpath $zc_directory '/' $file;
          if (
    $file != '.' && $file != '..' && !is_link ($nextpath))
          {
            if (
    is_dir ($nextpath))
            {
              
    $result directorySize($nextpath);
              
    $zc_size += $result['size'];
            }
            elseif (
    is_file ($nextpath))
            {
              
    $zc_size += filesize ($nextpath);
            }
          }
        }
      }
      
    closedir ($handle);
      return 
    $zc_size;
    }
    // eof GoDaddy work around 
    Skip
    • 446F63746F722057686F •

  3. #3
    Join Date
    Aug 2008
    Location
    Sydney Australia
    Posts
    829
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Skip,

    That appears to have worked but I don't have the option to save for some reason. I have a screen shot so you can have a look.
    Attached Images Attached Images  
    Outdoorking
    Live Site www.outdoorking.com.au

  4. #4
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: BackUp ZC [Support Thread]

    You seem to be missing define('BACKUP_EXCLUDED', 'Excluded '); that would be in YOUR_ADMIN/includes/languages/english/backup_zc.php

    I don't know how this is not working but check the file and re-upload if it is not there.

    The screen should look like the BackUp_ZC_Main_Window.gif file in the zip that you downloaded from the free software addons.

    Skip
    • 446F63746F722057686F •

  5. #5
    Join Date
    Aug 2008
    Location
    Sydney Australia
    Posts
    829
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Skip,

    This is what is in the file:

    <?php
    /*
    ***********************************************************************
    $Id: backup_zc.php, v 1.0.4 2010/07/09

    ZenCart 1.3.9f
    Copyright 2003-2010 Zen Cart Development Team
    Portions Copyright 2004 osCommerce
    http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

    Written By SkipWater <[email protected]> 05.08.10

    ***********************************************************************
    */


    // the following are the language definitions
    define('BACKUP_COMPLETE_TEXT', '<h1>Backup Completed</h1> Archive was created in ');
    define('BACKUP_DOWNLOAD', 'Backup file location will be downloaded <b>NOT SAVED ON SERVER</b>');
    define('BACKUP_FILE_NAME_TEXT', 'Backup File Name: ');
    define('BACKUP_LOCATION', 'Backup file location: ');
    define('BACKUP_TEXT', 'BackUp ');

    define('COMPLETE_TEXT', 'Complete Site ');
    define('CREATE_SQL_BACKUP', 'Create a SQL BackUp File From <b>'.DB_DATABASE.'</b> Database: ');

    define('DEFAULT_SETTINGS', 'Default Settings');
    define('DEFAULT_TEXT', ' (Defualt) ');
    define('DID_NOT_RUN_SQL_TEXT', 'You did NOT Run MySQL BackUp ');
    define('DOWNLOAD_ARCHIVE_TEXT', 'Download Archive:');
    define('DIR_FILES_EXCLUDED', 'Directory and Files excluded from archive: ');

    define('FILE_NAME_TEXT', '- File Name: ');
    define('FILE_TYPE_ZIP', 'File type Zip ');
    define('FILE_TYPE_GZIP', 'File type Gzip ');
    define('FILE_TYPE_TAR', 'File type Tar ');
    define('FTP_NOTE_TEXT', 'Please use FTP to download it to free up server space. Thank You<br />');

    define('HEADING_FILES', 'Files Only ');
    define('HEADING_OPTIONS', 'Options');
    define('HEADING_NOTES', 'Notes: ');
    define('HEADING_TITLE', 'Backup Zen Cart');

    define('MEMORY_MESSAGE_TEXT', '<b>Due to memory limits on some servers save the archive to the server. (Default)</b><br />or do one directory download at a time.');

    define('NO_TEXT', 'No ');
    define('NOT_ARCHIVED_TEXT', 'This directory is not archived so any files in it will NOT be added. ');
    define('ONLY_ONCE', 'You need to select this ONLY once per backup session. ');

    define('ROOT_FILE_TEXT', 'Web Site Root Files Only ');

    define('SAVE_TO_TEXT', 'Save BackUp File To: ');
    define('SECONDS_TEXT', ' seconds. ');
    define('SQL_FILE_TEXT', 'All SQL Files Only ');
    define('SQL_FILE_NAME_TEXT', 'SQL File Name ');
    define('SQL_FILE_LOCATION_TEXT', 'SQL file location ');
    define('SQL_FILE_ARCHIVE_NOTE', '
    Your SQL File will be in your arcive backup file. Only if you did a complete backup, sql file backup or Complete Admin backup.<br />
    Please use FTP to download or delete it to free up server space. Thank You<br /><br />
    ');

    define('TEXT_NOTES', '
    The options to the right allow you to select what you want to archive.<br /><br />
    Backup MySQL database will export your Zen Cart database to a SQL file.<br />
    When completed BackUp ZC will continue to create a archive file of your selected options. The SQL file will only be added to the archived if you selected Complete Site, All SQL Files or Your Admin Directory.<br /><br />
    If you select a directory to backup the directory name will be added to the archives file name. This will allow you to idenify the files contents easily.<br /><br />
    Selecting \'Yes\' in the Download Archive dropdown you will get a new window to download your archive.<br /><br />
    If you get a blank page php memory has been over used. To fix you can edit backup_zc.php in your admin folder and raise the memory usage.<br /> <br />
    <b>Please be patient scanning your Zen Cart directory structure.</b><br />
    ');

    define('YES_TEXT', 'Yes ');
    define('ZIP_GZIP_COMPRESSION', 'Compression level Zip or GZip: ');
    //
    ?>
    Outdoorking
    Live Site www.outdoorking.com.au

  6. #6
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: BackUp ZC [Support Thread]

    I just downloaded BackUp ZC from the free software addons and looking at that file it has the code ie:
    PHP Code:
    // the following are the language definitions
    define('BACKUP_COMPLETE_TEXT''<h1>Backup Completed</h1> Archive was created in ');
    define('BACKUP_DOWNLOAD''Backup file location will be downloaded <b>NOT SAVED ON SERVER</b>');
    define('BACKUP_FILE_NAME_TEXT''Backup File Name: ');
    define('BACKUP_LOCATION''Backup file location: ');
    define('BACKUP_TEXT''BackUp ');
    define('BACKUP_EXCLUDED''Excluded '); 
    How it's gone from your file is unknown.

    Skip
    • 446F63746F722057686F •

  7. #7
    Join Date
    Oct 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Skip-
    Very nice addition. This eliminates any excuses for not backing up early and often.

    A question, though, that may show my ignorance. The ReadMe says "NOTE: If you intend to download files, we STRONGLY recommend you do it only via a secure SSL / HTTPS: connection."

    I have SSL on my site. To download via SSL do I do this by manually changing http to https on the Download Backup Archive page each time I go there?

    I have looked through backup_zc.php, backup_zconfig.php, and backup_zc_download.php and could spot nothing that would automatically make the Download Backup Archive page SSL nor otherwise make the download SSL protected. I prefer not to modify my admin/includes/configure.php to make my entire admin area SSL protected.

    Thanks.

  8. #8
    Join Date
    May 2010
    Posts
    52
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Ski,

    This is a great backup tool for ZC. It makes it very easy to backup the whole store and the DB. Thank you for the great job!

    I do have a couple of questions though.

    When I first tried this mod, and back up the database, the file name ends with ***.gzip.sql doesn't work. If I directly open this file using a text editor, such as notepad++, it shows apparently a compressed file. But if I tried to unzip the file first, then the 7-zip (latest version) told me it's a broken file. I also tried to rename this file to ***.sql.gzip, but still no good. My final solution is to edit the YOUR_ADMIN/backup_zconfig.php file. At the bottom of the file, here is my work

    // Do not edit below
    if ($sql_gzip == true) {
    $sql_file_name = $_SERVER['HTTP_HOST'].'_'.date("mdY-Hi").'_sql.zip'; //I have to change it from something.gzip.sql
    }

    Then it works perfectly.

    My second question is about Go Daddy. I do have another account on Go Daddy running zen-cart 1.3.9h. I read your post #30 and compared with the files I download (version 1.0.6). I found out they are different. Perhaps 1.0.6 is already ready for Go Daddy or am I missing something?

    I wonder anyone else tried this mod on a Go Daddy account and how it works? I knew the zen-cart developers do NOT recommend Go Daddy, but I also know many users are on Go Daddy including myself.

    Again, thank you for this great work. It saves me a lot of time and trouble to backup. If it also works on Go Daddy, that would be greater!

  9. #9
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: BackUp ZC [Support Thread]

    Quote Originally Posted by justin2010 View Post
    Ski,
    My second question is about Go Daddy. I do have another account on Go Daddy running zen-cart 1.3.9h. I read your post #30 and compared with the files I download (version 1.0.6). I found out they are different. Perhaps 1.0.6 is already ready for Go Daddy or am I missing something?

    I wonder anyone else tried this mod on a Go Daddy account and how it works? I knew the zen-cart developers do NOT recommend Go Daddy, but I also know many users are on Go Daddy including myself.

    Again, thank you for this great work. It saves me a lot of time and trouble to backup. If it also works on Go Daddy, that would be greater!
    I glad it worked for you.

    As for go daddy I did not try to fix the 1.06 code to work on go daddy because I have no testing bed.

    The simple reason it would not work is because go daddy has a folder owned by root in each web sites tree. And I used RecursiveIteratorIterator to get the ZC file tree and it dose not like it when the user has no rights to a folder. I have added an error for this Directory [%s] contained a directory we can not recurse into.
    If you install 1.06 on go daddy and get the error then you have to edit the code as shown in your post #30

    Skip
    • 446F63746F722057686F •

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. ZX Slideshow support thread
    By balihr in forum All Other Contributions/Addons
    Replies: 766
    Last Post: 18 Oct 2025, 11:23 AM
  3. SysCheck [support thread]
    By swguy in forum All Other Contributions/Addons
    Replies: 36
    Last Post: 24 Oct 2020, 05:28 AM
  4. v151 Ship2Pay Support thread
    By Design75 in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 5 Nov 2019, 01:14 PM
  5. ZJ Black 2 support thread
    By Liamv in forum Addon Templates
    Replies: 1
    Last Post: 15 Feb 2010, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg