Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-07-2009, 02:36 PM   #1
Registered: Oct 2009
Distribution: Fedora, HPUX
Posts: 31

Rep: Reputation: 2
Crontab & PHP help

I'm receiving the following error from my crontab and have a pretty good idea what is causing it; I just don't know what to do about it.

The error:
/bin/sh: php: command not found
The entry in crontab file
*/10 * * * *      php /path/to/external.php
Now my assumption is that it cannot find the php location and is defaulting to /bin/sh. How do I locate my PHP install directory? After I find it I assume I just modify the section of code above where php is?
Old 10-07-2009, 02:38 PM   #2
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Rep: Reputation: 37
whereis php
It will give you the full path to executable, then in crontab instead of php /script replace the php with the fullpath


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Backups with Crontab & tar waynevnc Linux - Server 19 04-17-2009 12:28 PM
crontab & process permissions JJX Linux - General 6 05-06-2006 11:26 AM
chkrootkit & rkhunter crontab Sabicas Linux - Security 1 11-27-2004 07:49 AM
/etc/crontab & environment variables gepesz Linux - Software 3 09-03-2004 01:26 AM
Problem when using crontab to execute a .php file doublesheep Linux - General 3 06-10-2004 08:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration