itivae
06-20-2012, 04:22 PM
Hi I am trying to setup a backup for a site. Cron finds the backup.php file but states that there is a syntax error. Here is the error:
/home/theurl/tomy/script/backup/bk.php: line 3: syntax error near unexpected token `('
/home/theurl/tomy/script/backup/bk.php: line 3: `$date = date("F-j-Y-g-ia");'
Here is the script:
$date = date("F-j-Y-g-ia");
echo exec("cd /home/theurl/tomy/backuplocation/backup/files;tar -cvpzf ibc-$date.tar /home/theurl/to_public_dir");
I have tried this with
<?php tags and without them. When the php tags are in the script they too return an error. Anyone have any idea what I am doing wrong?
Thanks
/home/theurl/tomy/script/backup/bk.php: line 3: syntax error near unexpected token `('
/home/theurl/tomy/script/backup/bk.php: line 3: `$date = date("F-j-Y-g-ia");'
Here is the script:
$date = date("F-j-Y-g-ia");
echo exec("cd /home/theurl/tomy/backuplocation/backup/files;tar -cvpzf ibc-$date.tar /home/theurl/to_public_dir");
I have tried this with
<?php tags and without them. When the php tags are in the script they too return an error. Anyone have any idea what I am doing wrong?
Thanks