[ZBX-24260] PNG graph color scheme wrong when using php 8.1 Created: 2024 Mar 23 Updated: 2025 Jan 22 |
|
Status: | Confirmed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 6.4.12, 7.0.0beta2 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Ryan Eberly | Assignee: | Zabbix Development Team |
Resolution: | Unresolved | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Rocky Linux 9.3 |
Attachments: |
![]() ![]() ![]() |
Description |
Steps to reproduce:
Expected 1. the shaded area between min and max should be the typical gold/yellow color
Running PHP 8.1.27: Running PHP 8.0.30 |
Comments |
Comment by Aigars Kadikis [ 2024 Mar 25 ] |
I can confirm a similar behaviour with PHP 8.1.27 and 6.4.12 frontend and light theme. |
Comment by Ryan Eberly [ 2025 Jan 22 ] |
aigars.kadikis - I'm coming back to this problem now primarily because PHP 8.0 is end of life and for security reasons I need to upgrade to PHP 8.2 at minimum. I did a bit more research and found the ZBX ticket that introduced the color changes referenced above:
Is there any plan to look at and fix this ticket? I know there have been tickets submitted to the queue to switch completely to SVG graphs, which is truly preferred over these classic graphs, But, a minimum fix so that the color scheme contrasts until then is necessary. What do you think? |
Comment by Ryan Eberly [ 2025 Jan 22 ] |
One more piece of information:
Currently in ui/include/classes/graphdraw/CLineGraphDraw.php on line 1782 seems to be where the problem is at. If I replace line 1782 with the contents of line 1785, then the color scheme is fixed. Additionally, I have not observed any PHP runtime errors as a result of this change on PHP 8.2. Perhaps this is an adequate fix to this problem in the meantime? |