I have two computers A and B. Computer A is the development machine, computer B is the live machine. I develop on computer A and update computer B with code modifications. Both are running the same version of redhat linux.
I have a line in my crontab file on computer A which executes fine.
41 5 * php -q /path/to/script/myscript.php
The script is not an executable, yet it still works. It does not matter if I had the #! /path/to/php -q line at the top of the script it still executes fine.
However, I have the same line in the crontab file on computer B and it does not work. I tried making the file executable, adding the #!... line at the top of my script before the <?php tag, still nothing. The owners are the same and with the same file permissions. I can execute the command at the command line and it work fine, but it will not work in cron.
Does anyone have any suggestions?