I am currently having an issue with creating files on my server due a cronjob. I use Direct Admin on a Linux server. This is my cronjob line:
/usr/local/bin/php /home/USER/domains/MYDOMAIN.COM/public_html/system/generate.php
The script basicly does this:
Create a database record in table_1
Update a row in the database in table_2
Create a .zip file on the server.
When I run the script by myself it does all that. But once the cronjob runs the script it does everything except Step 3 (Create a .zip file on the server).
I'm running out of ideas, it has to be something with the cronjob because when I run the script myself it works perfect! Did I wrote the cronjob wrong? Do I need to add something to be able to write files on the server (something with cronjob permissions??).
/usr/local/bin/php /home/USER/domains/MYDOMAIN.COM/public_html/system/generate.php
The script basicly does this:
Create a database record in table_1
Update a row in the database in table_2
Create a .zip file on the server.
When I run the script by myself it does all that. But once the cronjob runs the script it does everything except Step 3 (Create a .zip file on the server).
I'm running out of ideas, it has to be something with the cronjob because when I run the script myself it works perfect! Did I wrote the cronjob wrong? Do I need to add something to be able to write files on the server (something with cronjob permissions??).