我用cronjob&php cli blesta计费有问题,我在php / server中遇到了问题,或者有一个错误数据库。 我看到php cli已经安装。
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 (cli) (build立时间:2017年1月20日
07:54:54)Copyright(c)1997-2016 PHP Group Zend Engine v2.6.0,Copyright(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)
也许有人有这个想法。 对不起,如果不整洁…..
你正在运行一个cron作业的php脚本。
PHP脚本似乎希望从Web浏览器运行,因此REQUEST_URI。 它也可能是脚本运行的脚本,所以你可能需要挖掘。