CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    187

    mysqldump | gzip > not working

    In my code:

    Code:
    $command = 'C:\xampp\mysql\bin\mysqldump --host='.$host.' --user='.$user.' --password='.$pass.' --all-databases | gzip > databasebackup.sql.gz';
    system($command);
    does not work. It creates the file databasebackup.sql.gz but when I try to open it I get "Invalid archive directory"

    If I leave just $command = 'C:\xampp\mysql\bin\mysqldump --host='.$host.' --user='.$user.' --password='.$pass.' --all-databases > databasebackup.sql'; it works.
    It creates the file databasebackup.sql and I can open it without a problem.

    Any ideas what is wrong?

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: mysqldump | gzip > not working

    Since you're using XAMPP, that means you don't have Linux and that you cannot use gzip from the command line like that.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured