tibberous Posted March 17, 2010 Share Posted March 17, 2010 I have a PHP script that downloads an image from a 3rd party. It works when I run it from the command line, doesn't work when I run it as a cron daemon. I was thinking it might be having trouble because of relative file paths, so I tried running it from different directories and it still worked. The script is running, it's just the part that saves the image that doesn't - would it be a permissions error? Or is there something common I might want to check for? Link to comment https://forums.phpfreaks.com/topic/195530-script-doesnt-work-as-cron/ Share on other sites More sharing options...
scvinodkumar Posted March 17, 2010 Share Posted March 17, 2010 Most probably it will be permission problem, give the write permission to folder and check it. And while running cron, u need to give absolute path otherwise it will not work. Link to comment https://forums.phpfreaks.com/topic/195530-script-doesnt-work-as-cron/#findComment-1027429 Share on other sites More sharing options...
trq Posted March 17, 2010 Share Posted March 17, 2010 It could be any number of things. Cron generally doesn't have a $PATH variable defined, so you need to use absolute paths to programs as well. Can we see the script? Link to comment https://forums.phpfreaks.com/topic/195530-script-doesnt-work-as-cron/#findComment-1027431 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.