Page 25 of 29 FirstFirst ... 152324252627 ... LastLast
Results 241 to 250 of 286
  1. #241
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Thanks Skip.

    I asked the question because I changed
    Code:
    $file_name = $_SERVER['HTTP_HOST'].'_'.date("mdY-Hi"); // Create File Name
    to
    Code:
    $file_name = $_SERVER['HTTP_HOST'].'_'.date("dmY-Hi"); // Create File Name
    but the file names still have a mdy format.

    Have I missed something here??

  2. #242
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Quote Originally Posted by pewe View Post
    Thanks Skip.

    I asked the question because I changed
    Code:
    $file_name = $_SERVER['HTTP_HOST'].'_'.date("mdY-Hi"); // Create File Name
    to
    Code:
    $file_name = $_SERVER['HTTP_HOST'].'_'.date("dmY-Hi"); // Create File Name
    but the file names still have a mdy format.

    Have I missed something here??
    It's OK - the date has changed, but only on the website file and I was looking at the .sql file.

    I had to change the other two lines to alter the format of the sql file name.

    I have one other question though.

    I would like to change the 'time' so it does not use the time on the server but matches the time zone I am in. The server is using a US timezone but I am in the UK (London/Europe).

    Is this possible? - if so, how?

    Thanks

  3. #243
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    785
    Plugin Contributions
    7

    Default Re: BackUp ZC [Support Thread]

    Because the script is using the server time it would be to much to change the code.
    Some hosts allow you to change the server time zone GMT +- #, you might want to check.

    Skip
    • 446F63746F722057686F •

  4. #244
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Quote Originally Posted by skipwater View Post
    Because the script is using the server time it would be to much to change the code.
    Some hosts allow you to change the server time zone GMT +- #, you might want to check.

    Skip
    Thanks Skip.

    What I found strange was that when I look at the backup files created using Filezilla or the Control Panel File Manager, the date of creation is shown in GMT, but the file name is generated using GMT +6 (ie time zone of the server).

    However adding this
    Code:
    date_default_timezone_set('Europe/London');
    like this

    Code:
     // 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");
    date_default_timezone_set('Europe/London');
    appears to have done the trick.
    Last edited by pewe; 10 Jan 2014 at 06:11 PM.

  5. #245
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: BackUp ZC [Support Thread]

    Quote Originally Posted by pewe View Post
    It's OK - the date has changed, but only on the website file and I was looking at the .sql file.

    I had to change the other two lines to alter the format of the sql file name.

    I have one other question though.

    I would like to change the 'time' so it does not use the time on the server but matches the time zone I am in. The server is using a US timezone but I am in the UK (London/Europe).

    Is this possible? - if so, how?

    Thanks
    One way, before presenting the date formatting, I would create a date variable that is equal to the current date, then would shift the date timezone to the desired timezone, then would as coded display the date but have the date variable following in the presentation of the date add a comma, then the variable for the new date. The below hasn't been tested, but generally pieced together from php manual date/time related functions.

    So could insert some of the below with the applicable statement:

    Code:
    $newDate = new time();
    $newDate->setTimezone(new DateTimeZone('London/Europe'));
    //Assuming London/Europe is the correct format.
    
    $file_name = $_SERVER['HTTP_HOST'].'_'.date("dmY-Hi", $newDate); // Create File Name
    There appears to be other ways to do it as well, such as using date offset like functions, but ideally you would have somewhere a variable set to represent your local timezone and that would be fed into the function above instead of hard coding it, unless the standard becomes all dates will be in GMT and then there is no question
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #246
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: BackUp ZC [Support Thread]

    Quote Originally Posted by pewe View Post
    Thanks Skip.

    What I found strange was that when I look at the backup files created using Filezilla or the Control Panel File Manager, the date of creation is shown in GMT, but the file name is generated using GMT +6 (ie time zone of the server).

    However adding this
    Code:
    date_default_timezone_set('Europe/London');
    like this

    Code:
     // 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");
    date_default_timezone_set('Europe/London');
    appears to have done the trick.
    Of course, something like that fix is the preferred method. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #247
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Sorry - me again.

    The file name is created using
    Code:
    $file_name = $_SERVER['HTTP_HOST'].'_'.date("d-m-Y_H:i");
    This creates a file 'domain.com_10-01-2014_17:45.zip'

    How could I change this so that the file includes the 'store name' in place of or as well as the domain name in front of the date/time.

    Thanks

  8. #248
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: BackUp ZC [Support Thread]

    Quote Originally Posted by pewe View Post
    Sorry - me again.

    The file name is created using
    Code:
    $file_name = $_SERVER['HTTP_HOST'].'_'.date("d-m-Y_H:i");
    This creates a file 'domain.com_10-01-2014_17:45.zip'

    How could I change this so that the file includes the 'store name' in place of or as well as the domain name in front of the date/time.

    Thanks
    Wherever desired add in the constant STORE_NAME, though not sure what the correct variable name is if running a multi-store from a single database.

    Code:
    $file_name = $_SERVER['HTTP_HOST'].'_'.STORE_NAME.'_'.date("d-m-Y_H:i");
    For example, but would also be a good idea to do some string formatting on it to remove spaces, and do something with apostrophes and quotes, etc... Not sure off top of my head, which function(s) would be best to use at this point, but I'm sure ZC has some built in to handle filenames.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #249
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Quote Originally Posted by mc12345678 View Post
    Wherever desired add in the constant STORE_NAME, though not sure what the correct variable name is if running a multi-store from a single database.

    Code:
    $file_name = $_SERVER['HTTP_HOST'].'_'.STORE_NAME.'_'.date("d-m-Y_H:i");
    For example, but would also be a good idea to do some string formatting on it to remove spaces, and do something with apostrophes and quotes, etc... Not sure off top of my head, which function(s) would be best to use at this point, but I'm sure ZC has some built in to handle filenames.
    Thanks - appreciated.
    Your suggested code did the trick, including working with spaces. Will check out other things like apostrophes etc later.

  10. #250
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: BackUp ZC [Support Thread]

    Hi again.

    I have now done some tests and find I have a issue.
    When trying to extract a downloaded full web site backup there were problems with 'corrupt archive' messages.

    I have now determined that the cause of the problem is that within the 'images' directory are subdirectories with periods in the name - for example '1.Tools' or '2.Accessories'.

    So the period in the directory name seems to cause a problem.

    HOWEVER:
    This problem does not occur when I use the compression routine in my control panel to zip the same directories, nor does it appear with another backup script I have that also compresses the directories/files in ZC (this is not a ZC plugin but does a similar job).

    Anyone any suggestions as to how I can rectify this issue.

    Thanks

 

 
Page 25 of 29 FirstFirst ... 152324252627 ... LastLast

Similar Threads

  1. ZX Slideshow support thread
    By balihr in forum All Other Contributions/Addons
    Replies: 765
    Last Post: 30 May 2025, 12:57 AM
  2. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 20
    Last Post: 23 Apr 2025, 08:49 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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR