Upgrading php to 8.1

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
BenCowan
Posts: 64
Joined: Thu Jul 28, 2011 11:34 am

Upgrading php to 8.1

Post by BenCowan »

First, is there any kind of documentation on how to upgrade php (ex 7.4 to 8.1) and still have a functioning XI system?

I'm running XI 5.9.2 on RHEL 8

Secondly, I tried it myself without really knowing what I'm doing, and everything seems almost normal, except the Database Maintenance status is Red. I see the following messages in the dbmaint.log:

SQL: DELETE FROM xi_cmp_scheduledreports_log WHERE report_run < FROM_UNIXTIME(1641860735)
PHP Fatal error: Uncaught mysqli_sql_exception: Table 'nagiosxi.xi_cmp_scheduledreports_log' doesn't exist in /app/nagios/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php:788
Stack trace:
#0 /app/nagios/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php(788): mysqli_query()
#1 /app/nagios/nagiosxi/html/db/adodb/adodb.inc.php(1268): ADODB_mysqli->_query()
#2 /app/nagios/nagiosxi/html/db/adodb/adodb.inc.php(1246): ADOConnection->_Execute()
#3 /app/nagios/nagiosxi/html/includes/db.inc.php(542): ADOConnection->Execute()
#4 /app/nagios/nagiosxi/cron/dbmaint.php(331): exec_sql_query()
#5 /app/nagios/nagiosxi/cron/dbmaint.php(197): clean_db_table()
#6 /app/nagios/nagiosxi/cron/dbmaint.php(27): do_dbmaint_jobs()
#7 {main}
thrown in /app/nagios/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 788
sgardil
Posts: 137
Joined: Wed Aug 09, 2023 9:58 am

Re: Upgrading php to 8.1

Post by sgardil »

Hey @BenCowan

We currently do not have a process for manually upgrading your php version. It is recommended if you want php 8+ to migrate your distro from rhel 8 to rhel 9.
BenCowan
Posts: 64
Joined: Thu Jul 28, 2011 11:34 am

Re: Upgrading php to 8.1

Post by BenCowan »

That's exactly what I did, however, if I'm not mistaken I did eventually figure it out, and migrated to 8.1 first and then moved it all to RHEL9. I did it almost 6 months ago, so I might be mistaken. I think I might have some notes somewhere. :D
User avatar
phred
Posts: 11
Joined: Tue Jun 01, 2021 5:19 pm

Re: Upgrading php to 8.1

Post by phred »

Hey @BenCowan:

PHP 8 introduced many non backward compatible changes requiring numerous changes to XI. XI v5.9.0 was the first version to support PHP 8+, but many PHP 8 related issues have been found and fixed since v5.9.1, the version you are running. I would try upgrading your XI to the latest version, and see if that doesn't make migrating to PHP 8+ go smoother.
Let us know if you have additional questions.

Phred
BenCowan
Posts: 64
Joined: Thu Jul 28, 2011 11:34 am

Re: Upgrading php to 8.1

Post by BenCowan »

Yes, 5.9.1 was a prereq, as you said. I've already cleared this hurdle. Can't wait for the next one. :D
Post Reply