$command = 'if command -v tar >/dev/null && command -v mysqldump >/dev/null; then echo 1; else echo 0; fi';
$lastLine = exec($command, $output, $status);
if ((int)$status !== 0 || (int)$lastLine !== 1) {
$this->getBackupLogger()->add($this->getBackupLogStart() . Yii::t('ext_backup_manager', 'Missing linux binaries to create the backup!'));
$this->onBackupError(new CEvent($this));
Yii::app()->mutex->release($mutexKey);
return false;
}
PHP:$command = 'if command -v tar >/dev/null && command -v mysqldump >/dev/null; then echo 1; else echo 0; fi'; $lastLine = exec($command, $output, $status); if ((int)$status !== 0 || (int)$lastLine !== 1) { $this->getBackupLogger()->add($this->getBackupLogStart() . Yii::t('ext_backup_manager', 'Missing linux binaries to create the backup!')); $this->onBackupError(new CEvent($this)); Yii::app()->mutex->release($mutexKey); return false; }
Hi,
I have the same problem on my server. (Backup-Manager-Error: "Missing linux binaries to create the backup")
The command "exec("/usr/local/...../bin/mysqldump");" works on my server.
But mailwizz triggers the error!
It would be helpful to see the orginal php-error-message, to get more informationen, which could help to delimit the error.
Is there a log-file where I can see the php-errors?
Or is there an another way to see the orginal php-errors?
Thanks
see server logs re errors
are u on a shared host?
It's not about being in the path, it's about the user that runs the command to have access to it, so it's all about permissions and it seems the current user does not have privileges to execute the command.After a look into the error logs it seems that the command "mysqldump" is not in the path, therefore the error.
It's not about being in the path, it's about the user that runs the command to have access to it, so it's all about permissions and it seems the current user does not have privileges to execute the command.
/apps/extensions/backup-manager/common/models/BackupManagerSnapshot.php line 184Could you give me the filename and the directory of this code?
$command = 'if command -v tar >/dev/null && command -v mysqldump >/dev/null; then echo 1; else echo 0; fi';
Is there a better workaround for this? Like editing the paths in php.ini or apache itself?
Although this particular problem re commands not found / absolute paths did not happen to me, I guess it would be good for the KB to see your solution, so please feel encouraged to post it.It is possible that there may be better solutions. This also depends on the configuration of the server.
The solution has worked for me for 18 months without any problems.