![]() |
CRON error This cron used to work till yesterday. It suddenly stopped working. I am getting the following output. Any ideas? /bin/sh: /usr/local/bin/php: No such file or directory |
Re: CRON error Hmm, I don't know what distro of linux you are using, but generally PHP is installed in /usr/bin/php not /usr/local/bin/php. Perhaps you had a symlink there that disappeared? |
Re: CRON error Ask your host. |
Re: CRON error Add: #!/usr/bin/php in the top of your php file ;) Good luck ;) |
Re: CRON error Actually, what you need to do is to find the right the path for your PHP location. As I see that either your PHP path is incorrect or the path to your executable file is incorrect. By the way to find the right path of PHP check PHP info of your web hosting provider ;) |
Re: CRON error 1. Create a simple php file called info.php with the following content: <?php phpinfo(); ?> 2. Copy this file to your web server. 3. Then open this php file with your browser. Inside the report you will see path to php.ini in the row called Configuration File (php.ini) Path. Cheers, Rob |
Re: CRON error Yes the php is mostly /usr/bin/php in cent and ubuntu flovours try getting it by whereis php or from php info |
Re: CRON error Just wanted to chime in that you can also try running the cron command with the prefix of the path to php, e.g. instead of only having your cron script use the path to the file as the argument, try something like: Code: 28 14 * * * /usr/local/bin/php -q /yourscript.php-q flag suppresses HTTP header output. |
Re: CRON error Provided you have ssh access, login and run: Code: which php |
| All times are GMT -6. The time now is 06:46 PM. |