I changed what you said , but I still don't understand why it's working from browser and not from cron, anyway now I don't receive any erors about mysql now I receive the erors about the file which must be created by my script.
I made the cron to run every minute, to see what's happening, but if I was looking from ftp no file was created by the script from cron, so I think the errors are explainable .. because no file was there .. the big question is why the file was not created ??
When I ran the script again from browser a new archive was created , the size was 1,5 M ... so this is the size of my database archived .. so from browser everything is ok.
bellow I will paste the errors:
Warning: fopen(temporar/2004-01-11.sql): failed to open stream: No such file or
directory in /home/user/public_html/testdb.php on line 49
Warning: fputs(): supplied argument is not a valid stream resource in
/home/user/public_html/testdb.php on line 50
Warning: fclose(): supplied argument is not a valid stream resource in
/home/user/public_html/testdb.php on line 51
gzip: temporar/2004-01-11.sql: No such file or directory
Warning: fopen(temporar/2004-01-11.sql.gz): failed to open stream: No such file
or directory in /home/user/public_html/testdb.php on line 5
Warning: filesize(): Stat failed for temporar/2004-01-11.sql.gz (errno=2 - No
such file or directory) in /home/user/public_html/testdb.php on line 5
Warning: fread(): supplied argument is not a valid stream resource in
/home/user/public_html/testdb.php on line 5
10x
see ya