lukecyca / pyzabbix

Python Zabbix API
977 stars 316 forks source link

In zabbix 7.0 the auth parameter is deprecated #226

Closed archnemeziz closed 2 months ago

archnemeziz commented 4 months ago

In php-fpm error log: PHP Deprecated: Parameter "/auth" is deprecated. in /usr/share/zabbix/include/classes/validators/CApiInputValidator.php on line 1513

Starting from 7.0 Authorization: Bearer <token/session> header should be used instead and auth parameter omitted entirely. This should be fixable by adding a version check for 7.0 and running the connection function differently according to version.

archnemeziz commented 2 months ago

In retrospect now that I've finally had a chance to take a closer look at this, pyzabbix already has this implemented and working. Problem was actually the PHP calling out the script forcing specific python binary to be used and that had an older version of pyzabbix. After changing the version used in PHP code the warning no longer appears in logs. Sorry for the confusion.