| | #1 |
| Advanced Warrior War Room Member Join Date: 2010 Location: Melbourne, Australia
Posts: 688
Thanks: 367
Thanked 70 Times in 58 Posts
|
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 |
| |
| | #2 |
| Active Warrior War Room Member Join Date: 2011 Location: Tampa, FL
Posts: 33
Thanks: 3
Thanked 8 Times in 5 Posts
|
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?
|
| |
| | #3 |
| VIP Warrior War Room Member Join Date: 2006 Location: , , USA.
Posts: 1,795
Thanks: 70
Thanked 287 Times in 259 Posts
|
Ask your host.
|
| |
| | #4 |
| Senior Web Developer War Room Member Join Date: 2011 Location: Quebec, Canada
Posts: 113
Thanks: 32
Thanked 19 Times in 17 Posts
|
Add: #!/usr/bin/php in the top of your php file ![]() Good luck |
| |
| | #5 |
| HyperActive Warrior Join Date: 2010
Posts: 131
Thanks: 0
Thanked 8 Times in 8 Posts
|
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 |
| | |
| |
| | #6 |
| Marketing with an accent. War Room Member Join Date: 2010 Location: Switzerland
Posts: 556
Thanks: 103
Thanked 179 Times in 135 Posts
| 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 |
| ================================================== === This blog is awesome: http://www.robkonrad.com/blog. Read it. ================================================== === | |
| |
| | #7 |
| Warrior Member Join Date: 2011
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
Yes the php is mostly /usr/bin/php in cent and ubuntu flovours try getting it by whereis php or from php info
|
| |
| | #8 |
| Jrim Software War Room Member Join Date: 2011
Posts: 26
Thanks: 9
Thanked 6 Times in 6 Posts
|
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. |
|
★ ★ [Proxy Software] ★ ★ [Proxy Lists] ★ ★
| |
| |
| | #9 |
| Warrior Member Join Date: 2011
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
|
Provided you have ssh access, login and run: Code: which php |
| |
|
| Bookmarks |
| Tags |
| cron, error |
| |