Skip to content

Commit

Permalink
Specify the path of mysqldump based on OS
Browse files Browse the repository at this point in the history
  • Loading branch information
drajathasan authored Sep 1, 2018
1 parent ca95c37 commit b66f0c9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion sysconfig.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,18 @@ function stripslashes_deep($value)

/* DATABASE BACKUP config */
// specify the full path of mysqldump binary
$sysconf['mysqldump'] = '/usr/bin/mysqldump';
// Added by Drajat Hasan
// For Windows platform with XAMPP
if (preg_match("/(Windows)/i", php_uname('a'))) {
if (preg_match("/(xampp)/i", __DIR__)) {
$rempath = substr(__DIR__, 0, strpos(__DIR__, "htdocs"));
$sysconf['mysqldump'] = $rempath."mysql\bin\mysqldump.exe";
}
} else {
// For Linux Platform
$sysconf['mysqldump'] = '/usr/bin/mysqldump';
}

// backup location (make sure it is accessible and rewritable to webserver!)
$sysconf['temp_dir'] = '/tmp';
$sysconf['backup_dir'] = UPLOAD.'backup'.DS;
Expand Down

0 comments on commit b66f0c9

Please sign in to comment.