Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.5

Bug #1294 Call-time pass-by-reference has been deprecated
Submitted: 2004-04-27 14:28 UTC
From: peter dot albertsson at moreforyou dot se Assigned: graeme
Status: Closed Package: Net_Geo
PHP Version: 4.3.4 OS: winXP
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 45 - 28 = ?

 
 [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>

Comments

 [2004-04-27 23:19 UTC] graeme
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. I really wish I could do a new release of this. Started a rewrite but I've bene in 12 months of work hell. I package a new release to sort out this bug and dependency.