PHP error with bulk modification tool
Posted: Thu Apr 25, 2024 12:23 pm
Hiya,
I've been trying to use the bulk modification tool to change the notification options on 1800~ services. I get a blank page and this in the error logs:
[Thu Apr 25 11:46:22.760601 2024] [php:error] [pid 92149] [client xxx.xxx.xxx.xxx:38470] PHP Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''c','r', `last_modified` = NOW() WHERE `id` IN ('9691','9692','9693','9694','969' at line 1 in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php:788\nStack trace:\n#0 /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php(788): mysqli_query()\n#1 /usr/local/nagiosxi/html/db/adodb/adodb.inc.php(1268): ADODB_mysqli->_query()\n#2 /usr/local/nagiosxi/html/db/adodb/adodb.inc.php(1246): ADOConnection->_Execute()\n#3 /usr/local/nagiosxi/html/includes/db.inc.php(569): ADOConnection->Execute()\n#4 /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php(406): exec_sql_query()\n#5 /usr/local/nagiosxi/html/includes/components/bulkmodifications/step2.php(184): bmt_change_single_config_option()\n#6 /usr/local/nagiosxi/html/includes/components/bulkmodifications/step2.php(27): bmt_process_ccm_bulk_submission()\n#7 {main}\n thrown in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 788, referer: https://nagios.example.com/nagiosxi/inc ... ngleoption
I'm running the latest version of XI (2024R1.1.2) on Centos 7.9.2009. My PHP version is 8.1.28 and my MariaDB is Ver 15.1 Distrib 5.5.68-MariaDB. (x86_64)
I realize that this is likely related to the fact I upgraded from PHP 5.x to 8.x a couple of weeks ago. I also realize that I should've just migrated to a more modern OS release but I had a security auditor to appease...They were not happy to see php 5.x
I have already migrated my XI data to a modern distro but we aren't quite ready to make the cutover, so I figured I'd post here and ask if anyone knows of a way to fix this aside from rolling back or switching to a modern distro. If not, no worries, it isn't worth digging too deep into it. I'll be back in a couple of weeks when I find an issue related to the fact I've just migrated from Centos 7.9 to Ubuntu 22.04... I've learned nothing!
I've been trying to use the bulk modification tool to change the notification options on 1800~ services. I get a blank page and this in the error logs:
[Thu Apr 25 11:46:22.760601 2024] [php:error] [pid 92149] [client xxx.xxx.xxx.xxx:38470] PHP Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''c','r', `last_modified` = NOW() WHERE `id` IN ('9691','9692','9693','9694','969' at line 1 in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php:788\nStack trace:\n#0 /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php(788): mysqli_query()\n#1 /usr/local/nagiosxi/html/db/adodb/adodb.inc.php(1268): ADODB_mysqli->_query()\n#2 /usr/local/nagiosxi/html/db/adodb/adodb.inc.php(1246): ADOConnection->_Execute()\n#3 /usr/local/nagiosxi/html/includes/db.inc.php(569): ADOConnection->Execute()\n#4 /usr/local/nagiosxi/html/includes/components/bulkmodifications/bulkmodifications.inc.php(406): exec_sql_query()\n#5 /usr/local/nagiosxi/html/includes/components/bulkmodifications/step2.php(184): bmt_change_single_config_option()\n#6 /usr/local/nagiosxi/html/includes/components/bulkmodifications/step2.php(27): bmt_process_ccm_bulk_submission()\n#7 {main}\n thrown in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 788, referer: https://nagios.example.com/nagiosxi/inc ... ngleoption
I'm running the latest version of XI (2024R1.1.2) on Centos 7.9.2009. My PHP version is 8.1.28 and my MariaDB is Ver 15.1 Distrib 5.5.68-MariaDB. (x86_64)
I realize that this is likely related to the fact I upgraded from PHP 5.x to 8.x a couple of weeks ago. I also realize that I should've just migrated to a more modern OS release but I had a security auditor to appease...They were not happy to see php 5.x
I have already migrated my XI data to a modern distro but we aren't quite ready to make the cutover, so I figured I'd post here and ask if anyone knows of a way to fix this aside from rolling back or switching to a modern distro. If not, no worries, it isn't worth digging too deep into it. I'll be back in a couple of weeks when I find an issue related to the fact I've just migrated from Centos 7.9 to Ubuntu 22.04... I've learned nothing!