Skip to main content
Question

PHP Warning: Undefined variable $db on service-monitoring widget during export

  • February 9, 2026
  • 3 replies
  • 22 views

Stéphane LE CAËR
Forum|alt.badge.img+6

Hi,

I migrated Centreon from 23.10 to 24.10.17 on January 22. I've been notified of a problem with the export, which no longer works in Customviews.

For example, export from a service-monitoring :


/var/log/php-fpm/centreon-error.log

[09-Feb-2026 10:35:16 UTC] PHP Warning:  Undefined variable $db in /usr/share/centreon/www/widgets/service-monitoring/src/export.php on line 443

The rest of the interface works fine.

I have a development platform with the same version number on which I cannot reproduce the problem. It works fine.

Anay idea ?

3 replies

lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • February 18, 2026

Hi ​@Stéphane LE CAËR , can you try to edit /usr/share/centreon/www/widgets/service-monitoring/src/export.php and replace line 443 by:

$gmt = new CentreonGMT();


Stéphane LE CAËR
Forum|alt.badge.img+6

Hi ​@lpinsivy 
 

I made the change, but it didn't make any difference.

/usr/share/centreon/www/widgets/service-monitoring/src/export.php

What I forgot to mention is that once the export is requested, the web UI stops responding. If I close the tab and come back, I can't reconnect to Centreon. I have to close the browser (Google Chrome), wait a few minutes, and then come back for it to work.

I have instructed people not to use this button (export). Instead, they should use the newly available export function in the status view, which works properly.

 


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • February 24, 2026

Hi ​@Stéphane LE CAËR , Sorry for the inconvenience.

We are working on it, can you try changes of this PR?

https://github.com/centreon/centreon/pull/9764/changes

Regards