Re: To 'f' or not to 'f'
| From: | Steve Matzura | Date: | Fri, 11 Oct 2024 19:47:47 +0000 |
| Subject: | Re: To 'f' or not to 'f' | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-328559@lists.php.net to get a copy of this message | ||
On 10/11/2024 11:43 AM, John Iliffe wrote:
On Fri, 2024-10-11 at 08:56 -0400, Steve Matzura wrote:cd /home/tgvpadmin/domains/theglobalvoice.info/public_html && php -f mail_gallery_updates.php With "-f" in the command, it runs, a mail message is created and sent out by Postfix--I can see it in the mail log, but the message never gets to the intended recipients. I removed the "-f", and it works. Coincidence? I don't think so. Since it doesn't generate any log, which I would get via email, I can't imagine why it wouldn't work with the "-f" in the command. It's academic at this point, as removing the "-f" caused it to work, so I'm leaving it that way.Under some now ancient version of PHP--probably 6, I had a cron job that read: php -f {my-php-script} and it ran every day like it was supposed to. Now, under 8.3, the job did not execute any more. I removed the '-f' from the line in cron, and the job runs. What is the difference between with and without 'f' if '-f' is supposed to be superfluous?The php man page says: ------- --file file-f file Parse and execute file------- so it looks like it should work but why the { } block? That may be confusing cron. John the {my-php-script} was just supposed to be a placeholder for the email. The actuaql cron command is: