RE: [PHP] Can't run PHP cli script from Cron
| From: | CodersNightMare | Date: | Fri, 28 Feb 2003 18:32:00 +0000 |
| Subject: | RE: [PHP] Can't run PHP cli script from Cron | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137607@lists.php.net to get a copy of this message | ||
I am sure you have tried this, but,
Do you call the full path to php for cron.
something like:
40 * * * * /usr/local/bin/php -q /home/user/phpcliscript
Hope this helps.
At 10:10 AM 2/28/2003 -0800, you wrote:
The path is #!/usr/local/bin/php -q But like I said, that can't be the problem because when I run it from the command line, it runs fine. The only problem I am having is that it won't run from cron. That is why I think it is an issue with the cron environment. All other types of scripts like bash scripts run fine from cron. I am surprised no one else has come across this problem before. Please help me!Justin Michael Couto justin@somnioworld.com Director of Operations 805.781.0420 Somnio World Web Solutions http://www.somnioworld.com-----Original Message----- From: R'twick Niceorgaw [mailto:public@utkalika.net] Sent: Friday, February 28, 2003 9:44 AM Cc: php-general@lists.php.net Subject: Re: [PHP] Can't run PHP cli script from Cron Shouldn't it be #!/usr/local/bin/php Or was it just a typo here? ----- Original Message ----- From: "Justin Michael Couto" <justincouto@msn.com> To: "'Ernest E Vogelsinger'" <ernest@vogelsinger.at> Cc: <php-general@lists.php.net> Sent: Friday, February 28, 2003 12:09 PM Subject: RE: [PHP] Can't run PHP cli script from Cron I can run it from the shell prompt perfectly fine. I just won't run from cron. I do have the statement: #!/usr/local/php In the beginning of my script. Like I said it works perfect when I run it by hand from the shell prompt. I think the reason it is not running has to do with the cron environment, but I am not ssure what it is.Justin Michael Couto justin@somnioworld.com Director of Operations 805.781.0420 Somnio World Web Solutions http://www.somnioworld.com-----Original Message----- From: Ernest E Vogelsinger [mailto:ernest@vogelsinger.at] Sent: Friday, February 28, 2003 12:55 AM To: Justin Michael Couto Cc: php-general@lists.php.net Subject: Re: [PHP] Can't run PHP cli script from Cron At 05:30 28.02.2003, Justin Michael Couto said: --------------------[snip]--------------------Here is my crontab entry: * * * * * /path/to/file/file_name.php I also have * * * * * /path/to/file/bash_test_script--------------------[snip]-------------------- Did you try to run the php file interactively, from the shell prompt? You need at last this statement on top of your PHP files:#!/usr/local/php--O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php