From: php at cakkie dot be Operating system: Linux Gentoo PHP version: 4.4.2 PHP Bug Type: Unknown/Other Function Bug description: ip2long returns unsigned long instead of signed long
Description: ------------ I'm using the same code on 2 servers. One server is a 2.6.6 debian with PHP 4.3.10 This one returns a signed long (as it should according to the documentation) The other server is a 2.6.14 Gentoo with PHP 4.4.0 This one returns an unsigned long (not what it should be) Since I didn't find any bugreport, nor other information regarding this behaviour, I decided to post a bug. As a reference, I have an example, along with phpinfo() running at both servers: correct: http://www.funpages.be/index.php incorrect: http://www.factsoflife.be/cakkie/index.php Reproduce code: --------------- echo ip2long('217.136.232.103'); Expected result: ---------------- -645339033 Actual result: -------------- 3649628263 -- Edit bug report at http://bugs.php.net/?id=36967&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36967&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36967&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36967&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36967&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36967&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36967&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36967&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36967&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36967&r=support Expected behavior: http://bugs.php.net/fix.php?id=36967&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36967&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36967&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36967&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36967&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36967&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36967&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36967&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36967&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36967&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36967&r=mysqlcfg
