I can successfully gunzip a file using my SSH connection but when I try to do this via PHP code (I need this run on a CRON job) nothing happens (and my file doesn't get unzipped).

$cmd = "gunzip /var/www/vhosts/myservername/httpdocs/test.txt.gz'";
$output = exec("$cmd");

If this is a PHP coding error then I'd gladly troubleshoot it but can anyone confirm that using this should work on a VPS 200?

I also have a need to unzip TAR files and put its contents into a separate folder via PHP code. Without the exec command I have no idea how to do this.