• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved 500 TypeError in MagicSpam 2.0.18-1 Free Edition by accessing Logfiles on Debian 10.13

tessa67

New Pleskian
Server operating system version
Debian 10.13
Plesk version and microupdate number
Plesk Obsidian 18.0.50 Update #1
Hello dear Plesk Community,

when starting the log files I get the following 500 error:

TypeTypeError
Messagesizeof(): Argument #1 ($value) must be of type Countable|array, string given
Filelib.logsearch.php
Line1531


When I try to disable MagicSpam, I get the following 500 error:

TypeError
MessageUndefined constant "SA_MANAGER"
Filelib.spamassassinmanagerutility.php
Line66

What do I need to do to fix the errors?

Plesk version: Plesk Obsidian 18.0.50 Update #1
OS version: Debian 10.13
MagicSpam version: 2.0.18-1 Free Edition

Thank you in advance!

Regards Tessa
 
I have solved the problem with viewing the logs myself. In the MagicSpam forum my post was not approved at this moment.

I have replaced in /opt/psa/admin/plib/modules/magicspam/lib/lib.logsearch.php some lines and it works.

line 1531
Code:
if (!$muaInfo || sizeof($muaInfo) < 1) {
with
Code:
if (!$muaInfo || sizeof((array)$muaInfo) < 1) {

line 1583
Code:
if (!$ipInfo || sizeof($ipInfo) < 1) {
with
Code:
if (!$ipInfo || sizeof((array)$ipInfo) < 1) {

line 1599
Code:
if (!$hostInfo || sizeof($hostInfo) < 1) {
with
Code:
if (!$hostInfo || sizeof((array)$hostInfo) < 1) {

line 1619
Code:
if (!$heloInfo || sizeof($heloInfo) < 1) {
with
Code:
if (!$heloInfo || sizeof((array)$heloInfo) < 1) {

and line 1668
Code:
if (!$recipInfo || sizeof($recipInfo) < 1) {
with
Code:
if (!$recipInfo || sizeof((array)$recipInfo) < 1) {

Regards Tessa
 
Ok, and the other Error when try to disable MagicSpam is also fixed.

Line 66 in /opt/psa/admin/plib/modules/magicspam/lib/lib.spamassassinmanagerutility.php

The constant SA_MANAGER was unquoted.

I changed it to:
Code:
'SA_MANAGER'
 
Good morning,

I'm running into the same problem on one of my servers.

I have two servers with the same version of centos and plesk. this magicspam bug occurs only in one of them.

I have not yet tried the solution that you indicate since they are servers in production and I cannot do it, it has to be programmed.

I will give my results when I make the changes.
 
I have solved the problem with viewing the logs myself. In the MagicSpam forum my post was not approved at this moment.

I have replaced in /opt/psa/admin/plib/modules/magicspam/lib/lib.logsearch.php some lines and it works.

line 1531
Code:
if (!$muaInfo || sizeof($muaInfo) < 1) {
with
Code:
if (!$muaInfo || sizeof((array)$muaInfo) < 1) {

line 1583
Code:
if (!$ipInfo || sizeof($ipInfo) < 1) {
with
Code:
if (!$ipInfo || sizeof((array)$ipInfo) < 1) {

line 1599
Code:
if (!$hostInfo || sizeof($hostInfo) < 1) {
with
Code:
if (!$hostInfo || sizeof((array)$hostInfo) < 1) {

line 1619
Code:
if (!$heloInfo || sizeof($heloInfo) < 1) {
with
Code:
if (!$heloInfo || sizeof((array)$heloInfo) < 1) {

and line 1668
Code:
if (!$recipInfo || sizeof($recipInfo) < 1) {
with
Code:
if (!$recipInfo || sizeof((array)$recipInfo) < 1) {

Regards Tessa
Works for me.

Thank you so much.
 
Back
Top