Open celane opened 1 year ago
Thank you for the contribution... can you please craft a fork/branch from here, so we can make this a bit more "seamless" for everyone?
FWIW, I do not have what I'd consider an adequate PHP8 development environment right now... so, I'm happy to take contributions for this one.
Note: We should still pass PHP5.6+ type tests ... mostly because I know many places still have ridiculously old environments for their Nagios/Icinga servers, despite as much as I hate that problem.
had some minor-yet-annoying bugs to stomp on, but will soon be ready to see about a merge, but I would like to address the 'backwards compatibility' issue first.
I'll see if I can try out running on php 5.6, but it'll be a downgrade. One of the systems I'm running pnp4nagios on is php8, the other is php7.2.
Okay, I spun up a VM with Fedora 22 that uses PHP 5.6, installed Nagios and pnp4nagios...and it works. At least, no bugs found while doing graphs, pdfs, etc.
So I have the same pnp4nagios code running on php8.0 (Fedora 35), php 7.2 (Alma 8.6) and php5.6 (Fedora22).
It's in a fork from this git project, probably should see about a merge.
Put in a "pull" request, so can merge changes now.
install.php
, both get_magic_quotes_gpc()
and MB_OVERLOAD_STRING
don't exist in modern PHP versions.application/helpers/rrd.php
both alerter()
and alerter_gr()
are missing a default value for $unit
Supporting PHP 5.6 seems like a bit of a lost cause. If they want to run legacy systems, let them use legacy code.
Have Celane's code (0.6.26-12) running on RH el8 using PHP 8.0.20. No major problems so far. Have a time frame when PHP 8.0 support will be merged in?
I've been using pnp4nagios for a long time, but recent changes to php has messed it up... SO, this fork seemed to be the most up-to-date, and put in a bit of effort to get things working, at least for me. I fully expect to get "yur doon it rong" comments.
Main features: works with php8, npcd running as a systemd service, rrdtool graphing needed a "writable fontconfig cache", rpm packaging.
Here'e the fork, with changes and a couple of rpm packages: https://github.com/celane/pnp4nagios
(the rpm makes use of a fun feature of 'build from git clone', since I prefer rpms for handling package install/upgrade, but git for actually keeping the code, thought it was worth sharing)