Page 1 of 6 123 ... LastLast
Results 1 to 10 of 57
  1. #1
    Join Date
    Jan 2006
    Location
    London, United Kingdom
    Posts
    19
    Plugin Contributions
    0

    Default MYSQL Backup addon error

    zencart version: 1.3.6 (will be upgraded shortly!)
    PHP: 4.4.4
    MYSQL: 4.1.21

    My store's not able to backup MYSQL database due to mysqldump path error.

    Error Messages
    "Result code: 127"

    "Skip Lock option (check this if you get a LOCK TABLES permissions error)
    ERROR: Could not locate the MYSQLDUMP backup utility. BACKUP FAILED."
    one line from my /admin/includes/languages/english/backup_mysql.php
    define('LOCAL_EXE_MYSQLDUMP', '/usr/bin/mysqldump'); // used for backups
    My host insisted the location of mysqldump is locating at /usr/bin/ so backup_mysql.php is correct.


    My hosting tech further investigated and stated:
    We have investigated your issue and the error we receive in the logs while running the backups is:

    sh: /usr/bin/mysqldump --host=localhost --user=xxxxxx --password=xxxxxx --opt --complete-insert --skip-lock-tables --result-file=/home/xxxxx/public_html/admin/backups/db_xxxxx_zencart_xxx.sql xxxxxx_zencart 2>&1: No such file or directory
    sh: -c: line 0: syntax error near unexpected token `0'
    sh: -c: line 0: `exit(0)'.

    which mean that the backup utility is looking for the backup file instead of creating one. I would suggest you to acquire support from the developers of Zen cart as any changes made by us would brake some thing.
    I've read http://www.zen-cart.com/forum/showthread.php?t=45039 and http://www.zen-cart.com/forum/showthread.php?t=45238. But I'm not sure what next actions I shall take? Any suggestions?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: MYSQL Backup error

    That same syntax works fine on a large number of other hosts without problem.

    I'm not sure how it should be changed to work with your particular host's server configuration. Without knowing detailed configuration differences between their servers and other servers, there is no quick answer.

    If you wanted to remove the "2>&1" part from the command sent to the server, you might find the error message will change to reflect more accurately what is happening, as I suspect using that on the command line is confusing the shell, since it's primarily used to send feedback to a calling script, which a shell statement doesn't have access to.


    To get a database backup "today", I suggest you use phpMyAdmin instead:
    http://www.zen-cart.com/wiki/index.p...P_THE_DATABASE
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Dec 2005
    Location
    NY
    Posts
    188
    Plugin Contributions
    0

    Default Re: MYSQL Backup error

    Hey Doc, I see you authored the Backup MYSQL Plugin and looking for some help on an error.

    Getting errors on both my live 1.2.7 and test 1.3.7 carts within the admins. Enclosed screenshot..."backups" dir is there and chmoded at 777..
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: MYSQL Backup error

    "Error: Backup directory does not exist. Please set this in configure.php"
    "Warning: dir(home/tcustom/public_html/zen137/admin/backups/) faied to open dir -- no such file or directory."
    Try putting a / at the beginning of the backup path in your admin configure.php. You can't use just "home/tcustom...." ... you need "/home/tcustom...."
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Dec 2005
    Location
    NY
    Posts
    188
    Plugin Contributions
    0

    Default Re: MYSQL Backup error

    In my admin configure.php I changed this:
    define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
    to this:
    define('DIR_FS_BACKUP', DIR_FS_ADMIN . '/home/tcustom/public_html/zen137/admin/backups/');
    but error still saying the backups dir does not exist and it doubles itself as below...

    Warning: dir(home/tcustom/public_html/zen137/admin//home/tcustom/public_html/zen137/admin/backups/) [function.dir]: failed to open dir: No such file or directory in /home/tcustom/public_html/zen137/admin/backup_mysql.php on line 385

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: MYSQL Backup error

    undo that change, or remove the DIR_FS_ADMIN . portion.

    what are the permissions and ownership on the "backups" folder ?

    oh ... what is your DIR_FS_ADMIN setting ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Dec 2005
    Location
    NY
    Posts
    188
    Plugin Contributions
    0

    Default Re: MYSQL Backup error

    Good work, Doc!

    My DIR_FS_ADMIN define did not have the leading / in the configure.php
    Added that and I'm good!

    Appreciate the help!

  8. #8
    Join Date
    Jan 2006
    Location
    London, United Kingdom
    Posts
    19
    Plugin Contributions
    0

    Default Re: MYSQL Backup error

    DrByte,

    Thank, I'll use PhpMyAdmin to backup for now.

    Cheers

  9. #9
    Join Date
    Feb 2004
    Posts
    174
    Plugin Contributions
    0

    Default Re: MYSQL Backup error

    ive just installed the backup files, when i go into admin tools and the backup page, there is just a button saying restore, should i have a backup button?

    so it can be backed up before needing to restore it?

    sorry if its a silly question

    Andy

  10. #10
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: MYSQL Backup error

    Have you checked that your admin/backups directory is writeable?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 
Page 1 of 6 123 ... LastLast

Similar Threads

  1. Edit Orders addon is giving MySQL error
    By m.digregorio in forum Managing Customers and Orders
    Replies: 0
    Last Post: 2 Aug 2012, 09:41 PM
  2. Backup MySql plugin error
    By jwurster in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 29 Jun 2009, 07:56 PM
  3. Backup MySql error
    By Geixa in forum General Questions
    Replies: 9
    Last Post: 14 May 2009, 03:47 AM
  4. After host change, mysql backup giving error 1045
    By canemasters in forum General Questions
    Replies: 12
    Last Post: 25 May 2008, 08:18 PM
  5. Backup MySQL Module error
    By oxicottin in forum General Questions
    Replies: 8
    Last Post: 16 May 2007, 02:38 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