Re: PHP in crontab job
| From: | Marek Kilimajer | Date: | Fri, 11 Oct 2002 18:02:47 +0000 |
| Subject: | Re: PHP in crontab job | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119676@lists.php.net to get a copy of this message | ||
The problem is crontab doesn't heve enviroment, there is no $PATH, $USER ...
Sharat Hegde wrote:
Hello John, Thanks for the help. I was able to solve this. Thanks Marek for your help too in giving the same solution. The problem was with the crontab command not having the full path to php. Silly that a command line on the shell script should work but crontab is unable to find the same path. Thanks again, SharatFrom: "John S. Huggins" <jhuggins@va.net> To: Sharat Hegde <sharat_hegde@hotmail.com> CC: php-general@lists.php.net Subject: Re: [PHP] PHP in crontab job Date: Fri, 11 Oct 2002 15:35:41 +0000 (UTC) On Fri, 11 Oct 2002, Sharat Hegde wrote:-Hello, - -I am having a problem at my ISP relating to execution of PHPcommands from-the crontab command. My ISP told me to have a look at the followingURL, but-despite following these instructions, the crontab job is not beingexecuted.-http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/ - -The crontab command line works from the shell prompt and I am able to -execute the php command from the command line as well as the lynxcommand --no problems with that. - -Any ideas on how to get the crontab to execute the PHP commands?Ensure you have specified the php program in the first line, I am sure you did this but here is how I do it. #!/usr/local/bin/php -q Make sure it is a fully specified pathname to the php executable. Crontab all too often does not have knowledge of your path environment so may get lost if you just say "php." Make sure you really do have a php executable. This is what will compile if you do not specify any configuration directives during the ./configure process. Tell us how you do.- -Regards, -Sharat - - -_________________________________________________________________ -Join the world?s largest e-mail service with MSN Hotmail. -http://www.hotmail.com - - --- -PHP General Mailing List (http://www.php.net/) -To unsubscribe, visit: http://www.php.net/unsub.php -************************************** John Huggins VANet jhuggins@va.net http://www.va.net/ **************************************_________________________________________________________________ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com