Search code examples
phpipv6inet-ntop

inet_ntop and IPv6 addresses and PHP 5.5


I have an error with PHP 5.5 that does not occured with PHP5.3 and 5.4. With IPv6 addresses, the function inet_ntop() throws me an error:

Invalid in_addr value.

You can look at my work on Github (function is in Network.php, line 88). You can also look at the test job on Travis-CI

Do you have any idea how to fix it?

Thank you for your help.


Solution

  • In fact, I did not use the function properly and it was sending malformed data. Works fine now, you can look at the corrected class here

    Anyway, thank you for your answers.