1 (edited by luckied 2020-03-27 02:02:00)

Topic: cleandb.sh php error: config.inc.php line 20: undefined constant

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.0 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: CentOS Linux release 7.7.1908 (Core)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  mariadb-5.5.64-1.el7.x86_64
- Web server (Apache or Nginx): nginx version: nginx/1.16.1
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

This is more of an FYI that this error is appearing in my cron logs, which are mailed to an admin account I have.
Are you aware of the PHP issue or do you want me to go digging for you? I'm not familiar at all with PHP, so I don't know why it's throwing an undef...

[EDIT] for some reason my png isn't uploading so here's the mail headers from cron:

Return-Path: <root@mail.lulz.engineering>
Delivered-To: anon@lulz.engineering
Received: by mail.lulz.engineering (Postfix)
    id XXXXX; Thu, 26 Mar 2020 02:02:02 +0000 (UTC)
Delivered-To: root@mail.lulz.engineering
Received: by mail.lulz.engineering (Postfix, from userid 0)
    id XXXXX; Thu, 26 Mar 2020 02:02:01 +0000 (UTC)
From: "(Cron Daemon)" <root@mail.lulz.engineering>
To: root@mail.lulz.engineering
Subject: Cron <root@mail> /usr/bin/php /opt/www/roundcubemail/bin/cleandb.sh >/dev/null
Content-Type: text/plain; charset=UTF-8
Message-Id: <XXXXX@mail.lulz.engineering>
Date: Thu, 26 Mar 2020 02:02:01 +0000 (UTC)

PHP Warning:  Use of undefined constant HIGH - assumed 'HIGH' (this will throw an Error in a future version of PHP) in /opt/www/roundcubemail-1.4.1/config/config.inc.php on line 20

Anything else you need, feel free to let me know!

Cheers,

-D

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: cleandb.sh php error: config.inc.php line 20: undefined constant

Nevermind, I fixed this by enclosing HIGH within single quotes (in my case only allowing TLSv1.2):

[root@mail ~]# grep HIGH /opt/www/roundcubemail-1.4.1/config/config.inc.php
        'ciphers' => 'HIGH:TLSv1.2',

[root@mail ~]# /usr/bin/php /opt/www/roundcubemail/bin/cleandb.sh
0 records deleted from 'contacts'
0 records deleted from 'contactgroups'
0 records deleted from 'identities'

Seems like that's all that was missing?