[ZBX-8029] Cant display maps with HHVM Created: 2014 Apr 02  Updated: 2017 May 30  Resolved: 2014 Apr 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.2.2
Fix Version/s: 2.3.0

Type: Incident report Priority: Trivial
Reporter: Taavi Assignee: Ivo Kurzemnieks
Resolution: Fixed Votes: 0
Labels: hhvm, php, squashable
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04, nginx, HHVM 3.0.1


Attachments: PNG File map.png    

 Description   

include/classes/sysmaps/CCanvas.php
line 71, 72

imagestring($this->canvas, 0, $this->width - 120, $this->height - 12, $date, $this->getColor('gray'));
imagestringup($this->canvas, 0, $this->width - 10, $this->height - 50, ZABBIX_HOMEPAGE, $this->getColor('gray'));

Second parameter (font) shoudn't be zero for both lines.

As php manual states from http://www.php.net/manual/en/function.imagestring.php

bool imagestring ( resource $image , int $font , int $x , int $y , string $string , int $color )

font
Can be 1, 2, 3, 4, 5 for built-in fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or any of your own font identifiers registered with imageloadfont().

It works with native PHP, but does not with HHVM (http://hhvm.com/)

So just replace 0 -> 1



 Comments   
Comment by Ivo Kurzemnieks [ 2014 Apr 10 ]

(1) No translatable strings changed.

oleg.egorov CLOSED

Comment by Ivo Kurzemnieks [ 2014 Apr 10 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-8029

Comment by Oleg Egorov (Inactive) [ 2014 Apr 11 ]

TESTED

Comment by Ivo Kurzemnieks [ 2014 Apr 11 ]

Font size is now changed from 0 to 1.

Fixed in pre-2.3.0 (trunk) r44311

Generated at Thu Mar 28 12:30:12 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.