[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: |
![]() |
||||||||
Issue Links: |
|
Description |
Steps to reproduce:
Result: 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, |
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]
|
Comment by Alexander Vladishev [ 2020 Jul 30 ] |
Closed as duplicate of |