Re: PHP + Cron jobs
| From: | Per Jessen | Date: | Sat, 27 Sep 2008 11:28:25 +0000 |
| Subject: | Re: PHP + Cron jobs | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281029@lists.php.net to get a copy of this message | ||
Waynn Lue wrote:
> I actually am using MAILTO, and that's where the problem is. A
> cronjob only mails when there actually is output, which I'm fine with..
> In fact, when I run php temp.php from the command line, I don't get
> any output. But when it's part of the cronjob, there's that
> content-type output, which triggers mail to me.
>
> You mentioned a correct php interpreter above. Should I instead be
> running php through some other way or with a specific flag?
Check what 'php -v' says when you run it from the command-line - it
shuold be something like this:
php -v
PHP 5.2.4 with Suhosin-Patch 0.9.6.2 (cli) (built: Sep 22 2007 02:01:31)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
I suspect yours might be saying 'cgi' instead of 'cli' ?
/Per Jessen, Zürich