Cron & PHP
Posted: Tue Dec 20, 2005 9:02 pm
Hi
I have a simple PHP script which, when ran manually from the command line, will write entries into a text log file.
When this script is ran via a cron job however, the log file doesn't get written to, but the rest of the script works fine.
The crontab entry is:
1-60/5 * * * * php /root/script.php
The permisions on the script & log files are:
-rwxrwxrwx 1 root root 0 Dec 21 12:47 log.log
-rwxr-xr-x 1 root root 1358 Dec 21 13:13 script.php
The cron job is ran by the root user.
Can someone please help me with this one?
Thanks
Ashley
I have a simple PHP script which, when ran manually from the command line, will write entries into a text log file.
When this script is ran via a cron job however, the log file doesn't get written to, but the rest of the script works fine.
The crontab entry is:
1-60/5 * * * * php /root/script.php
The permisions on the script & log files are:
-rwxrwxrwx 1 root root 0 Dec 21 12:47 log.log
-rwxr-xr-x 1 root root 1358 Dec 21 13:13 script.php
The cron job is ran by the root user.
Can someone please help me with this one?
Thanks
Ashley