|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11028 ip2long use now unsigned integer and long2ip doesnt work
Submitted: 2001-05-22 15:29 UTC Modified: 2001-09-09 07:42 UTC
From: alberty at neptunlabs dot de Assigned: derick (profile)
Status: Closed Package: Network related
PHP Version: 4.0 Latest CVS (2001-05-22) OS: i686-pc-linux-gnu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: alberty at neptunlabs dot de
New email:
PHP Version: OS:


 [2001-05-22 15:29 UTC] alberty at neptunlabs dot de
ip2long puts under 4.0.6RC1 unsigned integers.
now long2ip doesnt work.

./configure \
--with-apxs=/usr/local/apache/current/bin/apxs \
--with-config-file-path=/etc \
--with-openssl=/usr/local/openssl/current \
--enable-sigchild \
--enable-thread-safety \
--disable-short-tags \
--with-bz2 \
--with-curl=/usr/local/curl/current \
--enable-ftp \
--with-mhash=/usr/local/mhash/current \
--with-mysql=/usr/local/mysql/current \
--with-mm=../mm-1.1.3 \
--enable-trans-sid \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--with-zlib \
--with-jpeg-dir=/usr \
--with-png-dir=/usr/local \
--enable-inline-optimization \
--enable-memory-limit \
--enable-shmop \
--with-mcrypt=/usr/local/libmcrypt/current \
--with-recode \
--disable-debug \


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-22 15:39 UTC]
Ok, will see if we can really fix this now.

 [2001-05-22 15:42 UTC]
Can you please post a short script which shows the problem?

 [2001-05-23 02:50 UTC]
User reports:

Hi Derick.

here is a short code script fpr ip2long().
echo "$tmp1 - $tmp2 - $tmp3";

Under php4.0.5 $tmp2 results: -1062731766
with the same compiler options
under php4.0.6RC1 :  3232235530
 [2001-09-09 07:42 UTC]
Not a bug at all, this is the correct way to do it:
printf ("%s - %u - %s", $tmp1, $tmp2, $tmp3);
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 08 00:03:34 2021 UTC