[ZBX-18157] items.php returns 500 status in CentOS 7 Created: 2020 Jul 29  Updated: 2020 Jul 30  Resolved: 2020 Jul 30

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

Type: Problem report Priority: Trivial
Reporter: Yuuki Enomoto Assignee: Zabbix Development Team
Resolution: Duplicate Votes: 0
Labels: frontend
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 7


Attachments: PNG File array_column_error.png    
Issue Links:
Duplicate
duplicates ZBX-18160 Zabbix release 4.0.23 items.php issue Closed

 Description   

Steps to reproduce:

  1. Install Zabbix 4.0.23 server and frontend to CentOS 7
  2. Move "Configuration" -> "Hosts" -> "Items" of any host

Result:
items.php returns 500 status code. See also uploaded picture.

Why:

This is /var/log/httpd/error_log in this situation.

[Wed Jul 29 16:16:01.799344 2020] [:error] [pid 2193] [client 10.2.200.16:53016] PHP Fatal error: Call to undefined function array_column() in /usr/share/zabbix/items.php on line 2025, referer: http://10.2.7.142/zabbix/hosts.php?ddreset=1

The latest PHP version is 5.4.16-48 in CentOS 7.

The array_column() function is used since Zabbix 4.0.23, but the function requires PHP 5.5 or greater (https://www.php.net/manual/en/function.array-column.php).



 Comments   
Comment by Yuuki Enomoto [ 2020 Jul 30 ]

PHP recommended way is use https://github.com/ramsey/array_column/blob/master/src/array_column.php (See https://www.php.net/manual/en/function.array-column.php#refsect1-function.array-column-seealso).

I pasted this code into /usr/share/zabbix/include/func.inc.php. item.php page works fine.

Comment by Eduards Matuls (Inactive) [ 2020 Jul 30 ]

Hello!

Thank you for reporting the issue! Information passed to developers.

Regards,
Eduards

Comment by Beat Siegenthaler [ 2020 Jul 30 ]

Same for host_discovery.php

I do not expect such issues when i use the official CentOS zabbix repository. 

[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/4.0/rhel/7/$basearch/
enabled=1
gpgcheck=1

 

 

Comment by Alexander Vladishev [ 2020 Jul 30 ]

Closed as duplicate of ZBX-18160

Generated at Fri Jun 06 19:12:52 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.