I get the below error when I run my scrip from cron
Warning: filesize() [function.filesize]: stat failed for /home2/sharingi/public_html/scrape/zip/dailydose/April_14_2011.zip in /home2/sharingi/public_html/scrape/zip/zip.php
However if I run the script from my browser it works fine. Some kind of a permissions problem?
It’s probably an issue related to the user that your cron process runs under. Make sure that whatever cron runs as has permissions, since it’s probably not the same user as your ssh account or the webserver account. You can probably figure out which user cron runs as by configuring cron to run the command
whoamiand email you the output.If you can’t figure out how to make that work, you might try configuring cron to
wgetthe public url that you know works. Don’t forget to turn off the file saving, and set it to quiet mode, otherwise you’ll get a lot of garbage from each run.