运行 cronjob 错误未定义索引:REQUEST_URI

运行 cronjob 错误未定义索引:REQUEST_URI

我在使用 cronjob 和 php cli blesta billing 时遇到问题,我混淆了 php/server 中的问题,或者存在错误数据库。我看到 php客户端已安装。

Cron命令

*/5 * * * * /usr/bin/php /home/domains/member.domain.com/public_html/index.php cron

错误:未定义索引:REQUEST_URI

Unable to deliver 1 invoice to client #31661 via Email due to error: Undefined index: REQUEST_URI
Unable to deliver 1 invoice to client #31331 via Email due to error: Undefined index: REQUEST_URI
Unable to deliver 1 invoice to client #31158 via Email due to error: Undefined index: REQUEST_URI
Unable to deliver 1 invoice to client #31155 via Email due to error: Undefined index: REQUEST_URI
The deliver invoices task has completed.
Attempting to run all tasks for Wpfastest.
Attempting to apply credits to open invoices.
There are no invoices to which credits may be applied.
The apply credits task has completed.
Attempting to provision paid pending services.
The paid pending services task has completed.
Attempting to unsuspend paid suspended services.
The unsuspend services task has completed.
Attempting to process service changes.
The process service changes task has completed.
Attempting to process renewing services.
The process renewing services task has completed.

服务器规格:

Php 5.6、Apache 2.4、Mariadb5.5。


[root@s3eagle ~]# php /home/mydomain/test-cli.php

从 CLI 运行[root@superspeed ~]#

文本-​​cli.php

<?php 
if(php_sapi_name()==="cli")
  echo("Running from CLI"); 
else
  echo("Not Running from CLI"); 

php-v 命令

[root@s3eagle ~]# php -v

PHP 5.6.30(命令行)(建造时间:2017 年 1 月 20 日

07:54:54)版权所有 (c) 1997-2016 PHP Group Zend Engine v2.6.0,版权所有 (c) 1998-2016 Zend Technologies


php -m

    [root@s3eagle ~]# php -m
    [PHP Modules]
ares
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
gnupg
hash
iconv
igbinary
imagick
imap
intl
ionCube Loader
json
ldap
libxml
lzf
mailparse
mbstring
mcrypt
memcache
memcached
mhash
msgpack
mysql
mysqli
mysqlnd
OAuth
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_sqlite
Phar
posix
pspell
rar
readline
Reflection
session
shmop
SimpleXML
snmp
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tcpwrap
tokenizer
uploadprogress
uri_template
uuid
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
yaml
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)

也许有人有这个想法。如果写得不好,请见谅......

答案1

您正在从 cron 作业运行 php 脚本。

php 脚本似乎需要从 Web 浏览器运行,因此是 REQUEST_URI。它也可能是脚本运行的脚本,因此您可能需要深入挖掘。

相关内容