Answer the question
In order to leave comments, you need to log in
Cron job crashes with an error.?
I add a task via ISP with sending the result to soap.
This comes up:
/bin/sh: 1: /var/www/PATH-TO-FILE/cron.php: not found
I run it manually from ISP - the result is the same.
In the php script itself, at the beginning I wrote:
#!/usr/bin/php
There is no include or require in the script.
The rights to the script are root\777.
The script itself pulls the euro rate from cbr.ru and writes to the database. I checked it through the browser - everything is fine, i.e. syntax errors are excluded.
What's wrong?
Answer the question
In order to leave comments, you need to log in
Most likely there are no rights, perhaps not to the script itself, but to the overlying directories.
Judging by the text of the error, the file was not found. If there was a problem with the rights, then the error would be that you do not have enough rights. Check the file path. It is possible that you made a typo.
Try to output the directory directly in the script,
open it in a browser and check the path in the cron.
UPD
You can run the script with wget/usr/bin/wget domain.com/cron.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question