LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-07-2009, 03:36 PM   #1
CapnStank
Member
 
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:
Code:
/bin/sh: php: command not found
The entry in crontab file
Code:
*/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, 03:38 PM   #2
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

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


Reply


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 01:28 PM
crontab & process permissions JJX Linux - General 6 05-06-2006 12:26 PM
chkrootkit & rkhunter crontab Sabicas Linux - Security 1 11-27-2004 08:49 AM
/etc/crontab & environment variables gepesz Linux - Software 3 09-03-2004 02:26 AM
Problem when using crontab to execute a .php file doublesheep Linux - General 3 06-10-2004 09:46 AM


All times are GMT -5. The time now is 06:21 AM.

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