Display bin to IPv6 from log_visit don't work

i will extract rows from the database table visit_log via a shortened IPv6 from the Matomo backend.

In the Visitor Logs displaying shortened IPv6: “2a02:810a:600:8800::”

In my PHP script: “”

function binaryToStringIP($ip)
... (from piwik/vendor/piwik/network/src/IPUtils.php)

SELECT inet_ntoa(conv(hex(location_ip), 16, 10)) as visitorIP FROM log_visit
while ...
echo binaryToStringIP($log_visit_row["visitorIP"])  //
echo bin2hex($log_visit_row["visitorIP"])  // (nothing)
echo $log_visit_row["visitorIP"]  // (nothing)

With IPv4 (echo bin2hex(…)) there is no Problem.


SELECT * location_ip FROM log_visit