问题原文
原帖链接 · JVC · CC BY-SA 4.0
Trying to make sense of this. Doing a quick phpinfo() I get:
PHP Version 7.1.14
System Linux gatorxxxxx.hostgator.com n.nn.nnn-nnn.nnn.nnn.x86_64 #1 SMP Tue May 21 13:24:40 CDT 2019 x86_64
But when I try to install a cron that hits a URL every 30 days for the Auto-Install-free-SSL plugin that I've been using for years on a different host, cron reports:
Your server is running PHP version 5.4.45 but WordPress 5.3.2 requires at least 5.6.20.
Got Hostgator on the phone and they reported that all shared hosts are still on 5.4.x which fits the error message, but if phpinfo() is showing I'm on 7.1... what the heck is actually going on here? How can I get cron to also use 7.1 so the command will execute?
已采纳解答
原帖链接 · JVC · CC BY-SA 4.0
I have discovered that you can specify the version of PHP that cron should use like so:
/opt/php56/bin/php -q /home/userna5/public_html/testcron.php
thanks to this tutorial. All is now working as desired.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
