When I manually run the output from print it works fine. However the actual program produces the following error:
sh: /mysqldump: No such file or directory
<?php
$backupFile = "backup/wordpress" . date("Y-m-d-H-i-s") . '.gz';
$command = "mysqldump -hlocalhost -uusername -ppassword dbname | gzip > $backupFile";
print $command;
system($command);
?>