This is strange. On my Raspberry Pi (Debian) I can manually run a php file without a problem. However, I get this error when it is executed with a cron job:
/bin/sh: 1: /var/www/html/sunrise-sunset.php: not found
My cron job (using crontab -e) is as follows:
* * * * * php /var/www/html/sunrise-sunset.php >> /var/www/html/logbook.log 2>&1
However, when I add the shebang "#!/usr/bin/php" on the php page, the file is executed but all commented lines (*/ xxx */
) are also read. Of course, this results in a lot of errors. When I remove those comments, it's a 'not found' error again.
What could be the problem here?