Sussex_Chris
10-25-2009, 04:19 PM
I have the following file:
<?php
$ccyymmdd = date("Y - m - d (G,i)");
$file = fopen("dbbackups/".$ccyymmdd.".php","w");
// Write stuff here
fclose($file);
?>
When run from my browser it works fine. When I run from a cron job my Cron Daemon sends me a report:
Warning: fopen(dbbackups/2009 - 10 - 25 (11,10).php): failed to open stream: No such file or directory in /home/xxxxx/public_html/dbbackupcron.php on line 7
My Cron:
/usr/local/bin/php -q /home/xxxxxxx/public_html/dbbackupcron.php
Anyone know a work around for this? Perhaps using CURL instead of PHP?
<?php
$ccyymmdd = date("Y - m - d (G,i)");
$file = fopen("dbbackups/".$ccyymmdd.".php","w");
// Write stuff here
fclose($file);
?>
When run from my browser it works fine. When I run from a cron job my Cron Daemon sends me a report:
Warning: fopen(dbbackups/2009 - 10 - 25 (11,10).php): failed to open stream: No such file or directory in /home/xxxxx/public_html/dbbackupcron.php on line 7
My Cron:
/usr/local/bin/php -q /home/xxxxxxx/public_html/dbbackupcron.php
Anyone know a work around for this? Perhaps using CURL instead of PHP?