#29151 [Ana->Csd]: bugs.php.net fails to insert vote
| From: | jacques@php.net | Date: | Sat, 07 Aug 2004 09:30:26 +0000 |
| Subject: | #29151 [Ana->Csd]: bugs.php.net fails to insert vote | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-25718@lists.php.net to get a copy of this message | ||
ID: 29151
Updated by: jacques@php.net
Reported By: fdsoft at pganet dot com
-Status: Analyzed
+Status: Closed
Bug Type: Website problem
Operating System: irrelevant
PHP Version: Irrelevant
Assigned To: jacques
New Comment:
This bug has been fixed in CVS. Since the websites are not directly
updated from the CVS server, the fix might need some time to spread
across the globe to all mirror sites, including PHP.net itself.
Thank you for the report, and for helping us make PHP.net better.
Previous Comments:
------------------------------------------------------------------------
[2004-08-06 20:48:28] jacques@php.net
I'll commit the following patch
http://www.powertrip.co.za/patches/php-bugs-web-29151.diff
in the
morning as it works as expected on my development version of
php-bugs-web.
------------------------------------------------------------------------
[2004-08-06 13:08:50] jacques@php.net
Dave thanks for the 'headsup'. I have a patch against phpweb for the
same issue as well as checking which version of php is running on the
webserver. For phpweb look at this patch
http://www.powertrip.co.za/patches/phpweb-29151.diff
and I'll update
the patch for php-bugs-web shorlty which will be made available over at
http://www.powertrip.co.za/patches/php-bugs-web-29151.diff
for review.
I've tested the phpweb patch on http://php.mirrors.powertrip.co.za/ and
it works when going through a test squid cache server here at my office
and then via two netcache boxes at SAIX.
------------------------------------------------------------------------
[2004-08-04 19:57:18] dave@php.net
> if (ip2long($ips[$i]) != -1) {
Remember, as of PHP 5.0.0 ip2long() returns FALSE instead of -1.
------------------------------------------------------------------------
[2004-08-04 19:27:43] jacques@php.net
I've updated the patchfile and uploaded it to
http://www.powertrip.co.za/patches/php-bugs-web-29151.diff
for review.
------------------------------------------------------------------------
[2004-08-04 19:23:17] jacques@php.net
Okay I've slightly changed the patch. Which uses ip2long on the
current IP it's working through to validate if the string is really an
ip address (http://php.mirrors.powertrip.co.za/ip2long) if we get -1
back from ip2long we know this a valid ip address.
if (!eregi ("^(10|172\.16|192\.168)\.", $ips[$i])) {
if (ip2long($ips[$i]) != -1) {
$ip = $ips[$i];
break;
}
}
My pseudo code test returns the expected ip address even when I use
'unknown' and various other varients for the forwarded address.
------------------------------------------------------------------------
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/29151
--
Edit this bug report at http://bugs.php.net/?id=29151&edit=1