The code in line 69 of the functions.php file indirectly uses the database class that comes from importing the database.php file.
The checkLangCode() function makes use of the audit_log() function, which requires the dbconn() function, which would only work with the database class already imported, but it is still called on line 103, causing the error "PHP Fatal error: Uncaught Error : Class 'database' not found in /var/www/html/mailscanner/functions.php"
The workaround is to move the database.php file import to the top (after conf.php import: line 41)
Error to start Mailwatch : Class 'database' not found
https://github.com/mailwatch/MailWatch/blob/247d92fef35c7d77ea39d8b2003bd25069d96a41/mailscanner/functions.php#L69 https://github.com/mailwatch/MailWatch/blob/247d92fef35c7d77ea39d8b2003bd25069d96a41/mailscanner/functions.php#L103
The code in line 69 of the functions.php file indirectly uses the database class that comes from importing the database.php file. The checkLangCode() function makes use of the audit_log() function, which requires the dbconn() function, which would only work with the database class already imported, but it is still called on line 103, causing the error "PHP Fatal error: Uncaught Error : Class 'database' not found in /var/www/html/mailscanner/functions.php"
The workaround is to move the database.php file import to the top (after conf.php import: line 41)