php - Mysqldump with empty result in gzip? -
when output mysql dump regularly, outputs 30mb file. when use gzip, 0kb.
here code:
$command = "<path to>mysqldump --opt -h $dbhost -u$dbuser -p$dbpass $dbname | gzip> test.sql.gz"; system($command); result: test.sql.gz 0 kb --------------------------- $command = "<path to>mysqldump --opt -h $dbhost -u$dbuser -p$dbpass $dbname > test.sql"; system($command); result: test.sql 30 mb
do need specify full path gzip, instead of gzip? i'm not sure default path within php, doesn't cover you'd want.
Comments
Post a Comment