I am getting a different result from a php script when I run it as a cronjob as when I execute it manually. Have tried to look for information but can’t figure out what is happening. Please help!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there @fabriziocastrob6,
It is quite possible that when you run the PHP script via cron it might use a different php.ini file.
I could suggest 2 things:
cd
command before the php command in cronjob, so it would look something like this:Let me know how it goes! Regards, Bobby