-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8.0 Compatibility #361
Comments
This project is dead and there are lots of unpatched vulnerabilities. We ran ganglia for a few years but have since migrated to grafana+prometheus. |
I kind of got the impression that it's at least struggling, but I notice there are commits from Jan 2021, so it's not dead dead. But yeah, probably time to consider something else 👍 |
Munin looks to be pretty comparable to Ganglia and simple to set up. I haven't tried it yet, but will try to remember to report back when I find some time. |
I got the message: PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/ganglia-webfrontend/functions.php on line 732 This messages is likely new with php7.3. Will be an error with PHP8. For details see https://wiki.php.net/rfc/continue_on_switch_deprecation This in one small step to get ready for php8. See ganglia#361
According to the php documentation the "context" parameter to the error handler has been deprecated: https://www.php.net/manual/en/function.set-error-handler.php Let's move on and get ready for a newer php version (debian bullseye has 7.4). This in one small step to get ready for php8. See ganglia#361
I was able to get ganglia working with php82 on centos7. I made the following changes. file: /usr/share/ganglia/ganglia.php Line 353 - 355 commented out this //if ( in_array($context, $SKIP_GMETAD_CONTEXTS) ) { file: /usr/share/ganglia/ganglia/functions.php file: /usr/share/ganglia/ganglia/lib/common_api.php |
Additional: |
Check for the error log file $ vi /usr/share/ganglia/dwoo/plugins/builtin/blocks/if.php -> on line 41 change while loop with foreach loop |
After applying all the above-mentioned changes to the appropriate files in an installation of Ganglia on Debian 12, there is now still one error appearing in
The line 2530 in
so, I assume it needs to be re-written as a Maybe EDIT: Yup, that worked! |
Thank you all ! its is fixed now in PR #376, which has include some of your fix. |
@berlin2123 Is this change already available on epel? what version are we looking for exactly? |
yes,verssion >= *-48 , |
So what I did before was applying all the above mentioned patches to the PHP code with ganglia-web 3.7.5-40 on RHEL9. This still had some issues but I already could see the UI and my data was showing. After updating to 3.7.6-48, It fiddled with my configured apache settings for ganglia, so I set those back correctly but then I again ran into the argument issue where there are 4 expected and 5 given. So is it possible that the changes are not yet available in that version/release? |
you need show the details of that issue. find isuse >> check >> fix >> finally may send a Pull requests in this repository |
Apparently, I was doing something wrong on my end. Had confliciting versions/releases installed with different related packages (gmetad gmond web). When all of these have the same release of -48 this should work. Also had to note that /var/lib/ganglia/rrds should be owned by nobody instead of ganglia (which was in the past so I think?) |
There seem to be multiple fixes required for compatibility with PHP 8.0.3. It starts with:
It seems the fifth argument to
set_error_handler()
was deprecated a while back, and is now removed in PHP 8. After that:The text was updated successfully, but these errors were encountered: