Stefan, Ralf, All,
With async services active running by crontab (cronnie) I am getting a e-mail on every run every 5 minutes. In egroupware/api/asyncservices.php
there is a reference to a comment that is supposed to suppress this if my reading is correct, e.g.
if (isset($_SERVER['HTTP_HOST']))
{
header($num === false ? "HTTP/1.1 500 Can NOT obtain semaphore" : "HTTP/1.1 200 ".($num ? "$num job(s) executed" : 'Nothing to execute'));
}
// if the following comment got removed, you will get an email from cron for every check performed (*nix only)
//echo $msg;
if (defined('ASYNC_LOG'))
{
$f = fopen(ASYNC_LOG,'a+');
fwrite($f,$msg);
fclose($f);
}
The comment I presume is the //echo $msg;
which is certainly there, so is this supposed to suppress the e-mails? They are quite punctual, e.g.:
...
N 9 10:40 (Cron Daemon) (2K) Cron <http@2pi> /usr/bin/php -q -d memory_limit=-1 /srv/ht
N 10 10:45 (Cron Daemon) (2K) Cron <http@2pi> /usr/bin/php -q -d memory_limit=-1 /srv/ht
N 11 10:50 (Cron Daemon) (2K) Cron <http@2pi> /usr/bin/php -q -d memory_limit=-1 /srv/ht
N 12 10:55 (Cron Daemon) (2K) Cron <http@2pi> /usr/bin/php -q -d memory_limit=-1 /srv/ht
N 13 11:00 (Cron Daemon) (2K) Cron <http@2pi> /usr/bin/php -q -d memory_limit=-1 /srv/ht
N 14 11:05 (Cron Daemon) (2K) Cron <http@2pi> /usr/bin/php -q -d memory_limit=-1 /srv/ht
...
The content of the messages are a bit strange, mysqli.so
is very much loaded and the database being used is very much setup, but there are a few spurious messages to the contrary,
Date: Tue, 17 Oct 2023 10:40:01 -0500 (CDT)
From: "(Cron Daemon)" <http@3111skyline.com>
To: http@3111skyline.com
Subject: Cron <http@2pi> /usr/bin/php -q -d memory_limit=-1 /srv/http/htdocs/egroupware/api/asyncservices.php
default
Database error (EGroupware\Api\Db\Exception\Setup): Connection with Necessary php database support for mysql
(mysqli.so) not loaded and can't be loaded, exiting !!!
Maybe you not created a database for EGroupware yet. (999)
File: /api/src/Egw.php, Line: 117
#0 /srv/http/htdocs/egroupware/api/src/Egw.php(69): EGroupware\Api\Egw->setup()
#1 /srv/http/htdocs/egroupware/api/src/loader.php(113): EGroupware\Api\Egw->__construct()
#2 /srv/http/htdocs/egroupware/api/asyncservices.php(73): include('...')
#3 {main}
# Instance=default, User=, Request= , User-agent=
Database error: Connection with Necessary php database support for mysql (mysqli.so) not loaded and can't be
loaded, exiting !!!
Maybe you not created a database for EGroupware yet. (999)
/srv/http/htdocs/egroupware/api/src/Egw.php (117)
Checking with php -i
, mysqli.so
is loaded and doing what it is supposed to, e.g.
$ php -i
<snip>
mysqli
MysqlI Support => enabled
Client API library version => mysqlnd 8.1.23
Active Persistent Links => 0
Inactive Persistent Links => 0
Active Links => 0
Directive => Local Value => Master Value
mysqli.allow_local_infile => Off => Off
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => /run/mysqld/mysqld.sock => /run/mysqld/mysqld.sock
mysqli.default_user => no value => no value
mysqli.local_infile_directory => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
mysqli.rollback_on_cached_plink => Off => Off
<snip>
I’m not too concerned about the content of the e-mail being sent, the primary issue is suppressing the regular delivery of the e-mail each time async services runs. If the comment in asyncservices.php
isn’t the comment that does it – what to add?