I'm trying to restore MySQL dump created the following way:
require_once 'mysql_restore.class.php';
$restore_obj = new MySQL_Restore();
$restore_obj->server = 'localhost';
$restore_obj->username = 'root';
$restore_obj->password = '';
$restore_obj->database = 'database';
if (!$restore_obj->Execute(MSR_FILE, 'bk.sql.gz', true, false))
{
die($restore_obj->error);
}
but its showing an error
Warning: gzuncompress() [function.gzuncompress]: data error in C:\wamp\www\nidhin\mysql_restore.class.php on line 42 Warning: Invalid argument supplied for foreach() in C:\wamp\www\nidhin\mysql_restore.class.php on line 215
Any idea what I'm doing wrong?