PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_Geo » Bug #1294

Call-time pass-by-reference has been deprecated

Details

Submitted2004-04-27 14:28 UTC
Frompeter dot albertsson at moreforyou dot se
Assignedgraeme
StatusClosed
PackageNet_Geo
PHP Version4.3.4
OSwinXP
Roadmaps(Not assigned)

Comments

[2004-04-27 14:28 UTC] peter dot albertsson at moreforyou dot se

Description:
------------
Installed the Net_Geo package today (2004-04-27) with the command 'pear install'.

PACKAGE VERSION STATE
Archive_Tar 1.1 stable
Cache 1.5.4 stable
Console_Getopt 1.0 stable
HTML_Common 1.2.1 stable
HTML_QuickForm 3.2.2 stable
HTTP 1.2.3 stable
HTTP_Request 1.2 stable
I18Nv2 0.3.0 alpha
Net_Geo 1.0 stable
Net_Socket 1.0.2 stable
Net_URL 1.0.11 stable
PEAR 1.3b1 beta
XML_RPC 1.0.4 stable

This bug has been reported before, and is said to have been fixed, but it is not.

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in C:\php\PEAR\PEARLib\Net\Geo.php on line 567

Reproduce code:
---------------
<?php

require_once('Net/Geo.php');

// new Net_Geo object
$net_geo = new Net_Geo();

// fetch the client's IP
$ip = '212.209.185.194';

// fetch information array from net_geo
$results = $net_geo->getRecord($ip);

// output
echo "Single IP results:<br />";
echo "<pre>";
print_r($results);
echo "</pre>";

// example array of multiple IPs
$arr_ips = array
(
gethostbyname("www.google.com"),
gethostbyname("www.heise.de"),
gethostbyname("www.college.ch")
);

// fetch information array from net_geo
$results = $net_geo->getRecord($arr_ips);

// output
echo "Multiple IP results:<br />";
echo "<pre>";
print_r($results);
echo "</pre>";

?>

Expected result:
----------------
Array
(
[TARGET] => 212.209.185.194
[NAME] => NATURES-OWN-SE
[NUMBER] => 212.209.185.192 - 212.209.185.223
[CITY] => MOLNDAL
[STATE] => GOTEBORG OCH BOHUS (county)
[COUNTRY] => SE
[LAT] => 57.67
[LONG] => 12.00
[LAT_LONG_GRAN] => City
[NIC] => RIPE
[LOOKUP_TYPE] => Block Allocation
[DOMAIN_GUESS] => naturesown.se
[STATUS] => OK
)

Multiple IP results:

Array
(
[0] => Array
(
[TARGET] => 216.239.51.99
[NAME] => GOOGLE
[NUMBER] => 216.239.32.0 - 216.239.63.255
[CITY] => MOUNTAIN VIEW
[STATE] => CALIFORNIA
[COUNTRY] => US
[LAT] => 37.41
[LONG] => -122.08
[LAT_LONG_GRAN] => City
[LAST_UPDATED] => 11-May-2001
[NIC] => ARIN
[LOOKUP_TYPE] => Block Allocation
[DOMAIN_GUESS] => google.com
[STATUS] => OK
)

[1] => Array
(
[TARGET] => 193.99.144.71
[NAME] => HEISE-NET
[NUMBER] => 193.99.144.0 - 193.99.144.255
[CITY] => HANOVER
[STATE] => LOWER SAXONY (state)
[COUNTRY] => DE
[LAT] => 52.40
[LONG] => 9.73
[LAT_LONG_GRAN] => City
[NIC] => RIPE
[LOOKUP_TYPE] => Block Allocation
[DOMAIN_GUESS] => heise.de
[STATUS] => OK
)

[2] => Array
(
[TARGET] => 69.93.118.202
[NAME] => IANA-NETBLOCK-69
[NUMBER] => 69.0.0.0 - 69.255.255.255
[COUNTRY] => AU
[LAT] => -25.00
[LONG] => 135.00
[LAT_LONG_GRAN] => Country
[NIC] => APNIC
[LOOKUP_TYPE] => Block Allocation
[DOMAIN_GUESS] => apnic.net
[STATUS] => OK
)

)

Actual result:
--------------
<br />
<b>Warning</b>: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in <b>C:\php\PEAR\PEARLib\Net\Geo.php</b> on line <b>567</b><br />
<br />
<b>Warning</b>: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in <b>C:\php\PEAR\PEARLib\Net\Geo.php</b> on line <b>567</b><br />
Single IP results:<br /><pre>Array
(
[TARGET] => 212.209.185.194
[NAME] => NATURES-OWN-SE
[NUMBER] => 212.209.185.192 - 212.209.185.223
[CITY] => MOLNDAL
[STATE] => GOTEBORG OCH BOHUS (county)
[COUNTRY] => SE
[LAT] => 57.67
[LONG] => 12.00
[LAT_LONG_GRAN] => City
[NIC] => RIPE
[LOOKUP_TYPE] => Block Allocation
[DOMAIN_GUESS] => naturesown.se
[STATUS] => OK
)

</pre>Multiple IP results:<br /><pre>Array
(
[0] => Array
(
[TARGET] => 216.239.51.99
[NAME] => GOOGLE
[NUMBER] => 216.239.32.0 - 216.239.63.255
[CITY] => MOUNTAIN VIEW
[STATE] => CALIFORNIA
[COUNTRY] => US
[LAT] => 37.41
[LONG] => -122.08
[LAT_LONG_GRAN] => City
[LAST_UPDATED] => 11-May-2001
[NIC] => ARIN
[LOOKUP_TYPE] => Block Allocation
[DOMAIN_GUESS] => google.com
[STATUS] => OK
)

[1] => Array
(
[TARGET] => 193.99.144.71
[NAME] => HEISE-NET
[NUMBER] => 193.99.144.0 - 193.99.144.255
[CITY] => HANOVER
[STATE] => LOWER SAXONY (state)
[COUNTRY] => DE
[LAT] => 52.40
[LONG] => 9.73
[LAT_LONG_GRAN] => City
[NIC] => RIPE
[LOOKUP_TYPE] => Block Allocation
[DOMAIN_GUESS] => heise.de
[STATUS] => OK
)

[2] => Array
(
[TARGET] => 69.93.118.202
[NAME] => IANA-NETBLOCK-69
[NUMBER] => 69.0.0.0 - 69.255.255.255
[COUNTRY] => AU
[LAT] => -25.00
[LONG] => 135.00
[LAT_LONG_GRAN] => Country
[NIC] => APNIC
[LOOKUP_TYPE] => Block Allocation
[DOMAIN_GUESS] => apnic.net
[STATUS] => OK
)

)
</pre>