Page 1 of 2 12 LastLast
Results 1 to 10 of 57

Hybrid View

  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
    Sep 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: MYSQL Backup error

    Warning: dir(DIR_FS_admin/) [function.dir]: failed to open dir: No such file or directory in /home5/fivadayd/public_html/admin/backup_mysql.php on line 402

    Fatal error: Call to a member function read() on a non-object in /home5/fivadayd/public_html/admin/backup_mysql.php on line 404

    --------------------------------------------------------------------------------------------------------------------------

    I have setup 2 sites this week, both on same server, both in exactly the same way. I have looked at your previous fixes and compared the admin/includes/config.php files of bothe websites and both are set up exatly the same. I do not understand why one is working fine and one is not working at all?

    The current solution on this topic is a little bit vague, as I would only have to put a / in front of my path if I swap the DIR_FS_admin for a complete file path wouldn't I?
    But why would I even have to do this if it works on my other website automatically without changing anything??

    Regards,

    Lee

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

    Default Re: MYSQL Backup error

    Quote Originally Posted by Lee Mason Design View Post
    Warning: dir(DIR_FS_admin/): failed to open dir: No such file or directory ...
    I don't understand why it's saying "DIR_FS_admin" instead of the uppercase "DIR_FS_ADMIN".

    Furthermore, the code in the backup_mysql.php file refers to DIR_FS_BACKUP, and not DIR_FS_ADMIN at all! So, it seems whatever you've done to define('DIR_FS_BACKUP',....) is clearly pointing to the wrong thing.
    .

    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.

  9. #9
    Join Date
    Jul 2007
    Posts
    155
    Plugin Contributions
    0

    Default Re: MYSQL Backup error

    "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."


    ==
    I have same error. I did a backup last week and everything worked fine. Now all of a sudden I get this error. /admin/backups is CHMOD 777

    Why would it stop working when it was working previously?



    ==/edit

    Well after nosing around I learned that, despite the Zen instruction to turn on safe mode, this backup utility will not function if it is on. All the buttons etc. appear but it won't work. I either have to leave safe mode off or remember to turn it off when I want to do a backup.
    Last edited by stuffdone; 18 Dec 2007 at 12:52 AM. Reason: Found Solution
    28 years web design and counting.
    https://stuffdone.com

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

    Default Re: MYSQL Backup error

    Quote Originally Posted by stuffdone View Post
    Well after nosing around I learned that, despite the Zen instruction to turn on safe mode, this backup utility will not function if it is on. All the buttons etc. appear but it won't work. I either have to leave safe mode off or remember to turn it off when I want to do a backup.
    I'm not sure what "Zen instruction to turn on safe mode" you're referring to.
    Zen Cart has *always* recommended against the use of safe mode, as there are many far more efficient and effective ways to secure a server other than the overly restrictive safe mode in PHP.

    So, yes, turn off safe mode. The warning message in the backup_mysql tool specifically says that it typically won't work if safe mode is turned on.
    .

    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.

 

 
Page 1 of 2 12 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