can't exec("tar

dim4a
edited November -1 in Support Forums

Hi, please, could you suggest - execution this code does not extract files, but it can ungzip, say .tgz ? .tar will be unpacked, but then no .tar file will be unarchived.

if i add a Home Directory available in the panel
like: /home/vol1_1/ezyro.com/ezyro_.....

nothing changes

this code executed - do nothing.
no errors received.

<?php
$infile = '/htdocs/app.tar';
$outdir = '/htdocs';
# Check if folder exist
if(!is_dir($outdir)) {
    die('Folder does not exist');
}
# Check if folder is writable
if(!is_writable($outdir)) {
    die('Folder is not writable');
}
# Check if file exist
if(!file_exists($infile)) {
    die('File does not exist');
}
exec('tar -C $outdir -zxvf $infile');
?>