You are not logged in.
Hello.
In my /var/www/html/glpi/files/_log/php-errors.log I have many entries like these:
[2021-05-03 08:17:44] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 351
getFromDBByCrit expects to get one result, 19 found! {"user":"8@glpi","mem_usage":"0.001\", 5.25Mio)"}
[2021-05-03 08:17:44] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 351
getFromDBByCrit expects to get one result, 20 found! {"user":"8@glpi"}
[2021-05-03 08:17:44] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 351
getFromDBByCrit expects to get one result, 20 found! {"user":"8@glpi","mem_usage":"0.001\", 5.22Mio)"}
[2021-05-03 08:17:48] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 351
getFromDBByCrit expects to get one result, 1307 found! {"user":"8@glpi"}
[2021-05-03 08:17:50] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 351
getFromDBByCrit expects to get one result, 1308 found! {"user":"8@glpi"}
[2021-05-03 08:18:17] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 351
getFromDBByCrit expects to get one result, 1184 found! {"user":"8@glpi"}
BTW - the 8@glpi is Plugin_FusionInventory
Than I changed /var/www/html/glpi/inc/commondbtm.class.php line 351
from count($iter) to print_r($crit['WHERE'],1)
Now it looks like this:
sprintf(
'getFromDBByCrit expects to get one result, %1$s found!',
/* count($iter) */
print_r($crit['WHERE'],1)
)
);
}
return false;
}
With this change, In the php-errors.log I can now see:
found! {"user":"8@glpi"}
[2021-05-25 06:31:13] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 352
getFromDBByCrit expects to get one result, Array
(
[OR] => Array
(
[glpi_networkports_networkports.networkports_id_1] => 60618
[glpi_networkports_networkports.networkports_id_2] => 60618
)
)
found! {"user":"8@glpi","mem_usage":"0.001\", 5.28Mio)"}
[2021-05-25 06:31:18] glpiphplog.WARNING: CommonDBTM::getFromDBByCrit() in /var/www/html/glpi/inc/commondbtm.class.php line 352
getFromDBByCrit expects to get one result, Array
(
[OR] => Array
(
[glpi_networkports_networkports.networkports_id_1] => 156322
[glpi_networkports_networkports.networkports_id_2] => 156322
)
)
So I check the table glpi_networkports_networkports. No entries equal to 156322 or 60618 found in the networkports_id_2 column. But more than one found in the column networkports_id_1.
Have you had a similar case? What can I do with this? Delete the entire table?
Last edited by WebGreg (2021-05-25 09:55:38)
--
GLPI 10.0.7
GLPI-Inventory 1.2.1
Ubuntu Server 20.04 LTS
Offline