You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not possible to bint to ip4 address using context options any more. In documentation:
bindto
Used to specify the IP address (either IPv4 or IPv6) and/or the port number that PHP will use to access the network. The syntax is ip:port for IPv4 addresses, and [ip]:port for IPv6 addresses. Setting the IP or the port to 0 will let the system choose the IP and/or port.
but in fact it is not allow us to put 0 for ip address.
The script works with PHP 7.4 for example indeed. One of the key differences is the priorisation of the inet_pton's usage above inet_aton in >= PHP 8.1
Prior to the 8.1 rewrite, inet_aton was used for ipv4 addresses
therefore addresses like `0` passed.
For the bindto's case where both ip and port are set as such, we discard
the address binding.
devnexen
added a commit
to devnexen/php-src
that referenced
this issue
Sep 12, 2023
Prior to the 8.1 rewrite, inet_aton was used for ipv4 addresses
therefore addresses like `0` passed.
For the bindto's case where both ip and port are set as such, we discard
the address binding.
Description
It is not possible to bint to ip4 address using context options any more. In documentation:
but in fact it is not allow us to put 0 for ip address.
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.2.5
Operating System
No response
The text was updated successfully, but these errors were encountered: