[PHP-DEV] Bug #10681 Updated: Fix for #9698 breaks more than it fixes

2001-05-19 Thread derick

ID: 10681
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Critical
Status: Closed
Bug Type: Network related
Operating system: 
PHP Version: 4.0 Latest CVS (05/05/2001)
Assigned To: 
Comments:

I applied the patch, thanks for making it available. The original 'fix'
for bug #9698 has been reversed too. These fixes will be in PHP 4.0.6.

Derick

Previous Comments:
---

[2001-05-09 11:28:28] [EMAIL PROTECTED]
Someone who knows that part of PHP better should check the 
patch provided. Marked as to be fixed before 4.0.6

--Jani




---

[2001-05-06 13:10:26] [EMAIL PROTECTED]
Sure. Here it is:

http://global.team17.com/php4-unsigned.patch

Works for both printf and sprintf. Is there another function I missed?

---

[2001-05-06 12:00:05] [EMAIL PROTECTED]
Sounds ok to me, are you willing to make a patch for this?

---

[2001-05-05 04:40:03] [EMAIL PROTECTED]
?php
$ipaslong = ip2long(208.247.106.187);
print long2ip($ipaslong).n;
print bin2hex(pack(N, $ipaslong)).n;
?

That script run with PHP 4.0.5 prints:
208.247.106.187
d0f76abb

whereas with the latest CVS version it prints:
127.255.255.255
7fff

That makes that function completely unusable for me (and for others probably too). I 
have another proposal for fixing bug #9698, and that is implementing %u as a sprintf 
format specifier to output unsigned longs instead of signed.

This way he could use the following script for his problem (should go onto the ip2long 
page then):
?php
$ip = gethostbyname(www.php.net);
$out = sprintf(http://%u/brn, ip2long($ip));
echo $out;
?

If that fix would be accepted (and the other fix rolled back), I could add %u to 
sprintf myself and post it here.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10681edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] Bug #10681 Updated: Fix for #9698 breaks more than it fixes

2001-05-19 Thread Sean R. Bright

I shouldn't even bother sending this, but some people (read: me) might be a
little put off if someone had to quote the word fix whenever referring to
a piece of code they had written.  Its a PHP limitation and had nothing to
do with my code, I was just trying to address the problem at hand.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, May 19, 2001 8:27 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DEV] Bug #10681 Updated: Fix for #9698 breaks
 more than it
 fixes


 ID: 10681
 Updated by: derick
 Reported By: [EMAIL PROTECTED]
 Old-Status: Critical
 Status: Closed
 Bug Type: Network related
 Operating system:
 PHP Version: 4.0 Latest CVS (05/05/2001)
 Assigned To:
 Comments:

 I applied the patch, thanks for making it available. The
 original 'fix' for bug #9698 has been reversed too. These
 fixes will be in PHP 4.0.6.  Derick

 Previous Comments:
 --
 -

 [2001-05-09 11:28:28] [EMAIL PROTECTED]
 Someone who knows that part of PHP better should check the
 patch provided. Marked as to be fixed before 4.0.6  --Jani

 --
 -

 [2001-05-06 13:10:26] [EMAIL PROTECTED]
 Sure. Here it is:
 http://global.team17.com/php4-unsigned.patch  Works for both
 printf and sprintf. Is there another function I missed?

 --
 -

 [2001-05-06 12:00:05] [EMAIL PROTECTED]
 Sounds ok to me, are you willing to make a patch for this?

 --
 -

 [2001-05-05 04:40:03] [EMAIL PROTECTED]
 ?php $ipaslong = ip2long(208.247.106.187); print
 long2ip($ipaslong).n; print bin2hex(pack(N,
 $ipaslong)).n; ?  That script run with PHP 4.0.5 prints:
 208.247.106.187 d0f76abb  whereas with the latest CVS version
 it prints: 127.255.255.255 7fff  That makes that function
 completely unusable for me (and for others probably too). I
 have another proposal for fixing bug #9698, and that is
 implementing %u as a sprintf format specifier to output
 unsigned longs instead of signed.  This way he could use the
 following script for his problem (should go onto the ip2long
 page then): ?php $ip = gethostbyname(www.php.net); $out =
 sprintf(http://%u/brn, ip2long($ip)); echo $out; ?  If
 that fix would be accepted (and the other fix rolled back), I
 could add %u to sprintf myself and post it here.

 --
 -



 ATTENTION! Do NOT reply to this email!
 To reply, use the web interface found at
 http://bugs.php.net/?id=10681edit=2


 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10681 Updated: Fix for #9698 breaks more than it fixes

2001-05-09 Thread sniper

ID: 10681
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Critical
Bug Type: Network related
Operating system: 
PHP Version: 4.0 Latest CVS (05/05/2001)
Assigned To: 
Comments:

Someone who knows that part of PHP better should check the 
patch provided. Marked as to be fixed before 4.0.6

--Jani




Previous Comments:
---

[2001-05-06 13:10:26] [EMAIL PROTECTED]
Sure. Here it is:

http://global.team17.com/php4-unsigned.patch

Works for both printf and sprintf. Is there another function I missed?

---

[2001-05-06 12:00:05] [EMAIL PROTECTED]
Sounds ok to me, are you willing to make a patch for this?

---

[2001-05-05 04:40:03] [EMAIL PROTECTED]
?php
$ipaslong = ip2long(208.247.106.187);
print long2ip($ipaslong).n;
print bin2hex(pack(N, $ipaslong)).n;
?

That script run with PHP 4.0.5 prints:
208.247.106.187
d0f76abb

whereas with the latest CVS version it prints:
127.255.255.255
7fff

That makes that function completely unusable for me (and for others probably too). I 
have another proposal for fixing bug #9698, and that is implementing %u as a sprintf 
format specifier to output unsigned longs instead of signed.

This way he could use the following script for his problem (should go onto the ip2long 
page then):
?php
$ip = gethostbyname(www.php.net);
$out = sprintf(http://%u/brn, ip2long($ip));
echo $out;
?

If that fix would be accepted (and the other fix rolled back), I could add %u to 
sprintf myself and post it here.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10681edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10681 Updated: Fix for #9698 breaks more than it fixes

2001-05-06 Thread derick

ID: 10681
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Network related
Operating system: 
PHP Version: 4.0 Latest CVS (05/05/2001)
Assigned To: 
Comments:

Sounds ok to me, are you willing to make a patch for this?

Previous Comments:
---

[2001-05-05 04:40:03] [EMAIL PROTECTED]
?php
$ipaslong = ip2long(208.247.106.187);
print long2ip($ipaslong).n;
print bin2hex(pack(N, $ipaslong)).n;
?

That script run with PHP 4.0.5 prints:
208.247.106.187
d0f76abb

whereas with the latest CVS version it prints:
127.255.255.255
7fff

That makes that function completely unusable for me (and for others probably too). I 
have another proposal for fixing bug #9698, and that is implementing %u as a sprintf 
format specifier to output unsigned longs instead of signed.

This way he could use the following script for his problem (should go onto the ip2long 
page then):
?php
$ip = gethostbyname(www.php.net);
$out = sprintf(http://%u/brn, ip2long($ip));
echo $out;
?

If that fix would be accepted (and the other fix rolled back), I could add %u to 
sprintf myself and post it here.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10681edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10681 Updated: Fix for #9698 breaks more than it fixes

2001-05-06 Thread kettler

ID: 10681
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: Network related
Operating system: Linux
PHP Version: 4.0 Latest CVS (05/05/2001)
Description: Fix for #9698 breaks more than it fixes

Sure. Here it is:

http://global.team17.com/php4-unsigned.patch

Works for both printf and sprintf. Is there another function I missed?

Previous Comments:
---

[2001-05-06 12:00:05] [EMAIL PROTECTED]
Sounds ok to me, are you willing to make a patch for this?

---

[2001-05-05 04:40:03] [EMAIL PROTECTED]
?php
$ipaslong = ip2long(208.247.106.187);
print long2ip($ipaslong).n;
print bin2hex(pack(N, $ipaslong)).n;
?

That script run with PHP 4.0.5 prints:
208.247.106.187
d0f76abb

whereas with the latest CVS version it prints:
127.255.255.255
7fff

That makes that function completely unusable for me (and for others probably too). I 
have another proposal for fixing bug #9698, and that is implementing %u as a sprintf 
format specifier to output unsigned longs instead of signed.

This way he could use the following script for his problem (should go onto the ip2long 
page then):
?php
$ip = gethostbyname(www.php.net);
$out = sprintf(http://%u/brn, ip2long($ip));
echo $out;
?

If that fix would be accepted (and the other fix rolled back), I could add %u to 
sprintf myself and post it here.

---


Full Bug description available at: http://bugs.php.net/?id=10681


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]