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? Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.