ID: 29737 Updated by: [EMAIL PROTECTED] Reported By: belikoviv at is dot lg dot ua -Status: Open +Status: Feedback Bug Type: Network related Operating System: Windows 2000 SP4; Fedora Core 2 PHP Version: 5.0.0 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2004-08-19 15:57:42] belikoviv at is dot lg dot ua Since version 5.0 ip2long returns FALSE on invalid address. It is documented, and it is correct. But ip2long returns FALSE on 255.255.255.255 - it is _not_ correct, because 255.255.255.255 is _valid_ address. Documentation says that ip2long returns -1 on 255.255.255.255 - it is _correct_, because unsigned 0xffffffff is signed -1. Unfortunatelly, I cannot fix this error by myself... ------------------------------------------------------------------------ [2004-08-19 15:30:53] [EMAIL PROTECTED] http://www.php.net/Changelog-5.php#5.0.0RC3 : Fixed ip2long() to return FALSE if an IP address passed to this function is not valid. (Derick). The function really returns FALSE for 255.255.255.255 and for invalid addresses and this is what is documented. If it's not correct, change this bug to Network related, fix the source and then change it back to Documentation problem. If the behavior is correct, leave the bug closed. ------------------------------------------------------------------------ [2004-08-19 15:19:33] [EMAIL PROTECTED] Also a duplicate of #25487. The function should NEVER return FALSE, but it should return -1 for 255.255.255.255; if it does not do this, or it is not documented as such. The bug is open. ------------------------------------------------------------------------ [2004-08-19 14:59:00] [EMAIL PROTECTED] This is already documented and the function works as the documentation states. If you don't like how it was implemented, you are free to send a patch and/or to open a feature request. This is not a bug. ------------------------------------------------------------------------ [2004-08-19 14:54:37] belikoviv at is dot lg dot ua just see my previous comment ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29737 -- Edit this bug report at http://bugs.php.net/?id=29737&edit=1