Answer the question
In order to leave comments, you need to log in
Why does a php script run through cron work differently than a script run in the web interface?
I have a php script that downloads archives from FTP and unpacks them. If I run through the web interface, then the script works like clockwork, but through cron I get messages that the archive cannot be downloaded from FTP.
I can not understand what the problem is, and how to find out why the file is not downloading.
Answer the question
In order to leave comments, you need to log in
For cli and web environments, usually different php.ini are used, just look at phpinfo() from the web and from the console to see the difference in settings.
As an option, pull the script with cron via wget. Get it on the webIf you don't restrict requests to this URL by ip/key/port or otherwise, you run the risk of getting a DDoS hole.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question