after upgrade from nagiosql3.2.0 i have following issues
1) contact.cfg -> available commands "notify-host-by-email, notifiy-service-by-email" are not saved to contact names.
commands can be successfully choosen via gui, but can not be saved -> there is no error msg
contact.cfg has then no service /host notification command defined -> nagios can not be started
2)admin page shows Notice: Undefined variable: c in /opt/MYPath/nagiosql/functions/prepend_content.php on line 90
line 90 -> if (($$tmpVar[0] == '') || ($$tmpVar[0] == '0')) {
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, then we probably have a backward compatibility issue with variable variables used in prepend_content.php. This could be the reason for all your troubles. I need to build a PHP 5.5/5.6 environment here to reproduce and test - this will take some more time. Please be patient.
Your issues can't be reproduced with PHP7.
Last edit: Martin 2018-05-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear All,
after upgrade from nagiosql3.2.0 i have following issues
1) contact.cfg -> available commands "notify-host-by-email, notifiy-service-by-email" are not saved to contact names.
commands can be successfully choosen via gui, but can not be saved -> there is no error msg
contact.cfg has then no service /host notification command defined -> nagios can not be started
2)admin page shows Notice: Undefined variable: c in /opt/MYPath/nagiosql/functions/prepend_content.php on line 90
line 90 -> if (($$tmpVar[0] == '') || ($$tmpVar[0] == '0')) {
3) services -> All services -> loose their assigned hosts
not possible to save host assignements to services
Last edit: LOU 2018-05-09
Which PHP version do you use?
PHP Version 5.6.36
Ok, then we probably have a backward compatibility issue with variable variables used in prepend_content.php. This could be the reason for all your troubles. I need to build a PHP 5.5/5.6 environment here to reproduce and test - this will take some more time. Please be patient.
Your issues can't be reproduced with PHP7.
Last edit: Martin 2018-05-09
Ahh, i see
Thank you for supporting this!
So, can you download this file an test again:
https://gitlab.com/wizonet/nagiosql/blob/master/functions/prepend_content.php
This should replace the old functions/prepend_content.php file
With new repend_content.php file the issue is solved
Thank you!