Guest Posted August 28, 2006 Posted August 28, 2006 Hello all, Up until recently, my install of the Canada Post Shipping Module has worked flawlessly. I do not know the exact date when this error started appearing, but it has to be sometime since 06/19/2006 (date of the last order processed). Errors: 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 /var/www/vhosts/francescoscoffee.com/httpdocs/osCommerce/includes/modules/shipping/canadapost.php on line 166 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 /var/www/vhosts/francescoscoffee.com/httpdocs/osCommerce/includes/modules/shipping/canadapost.php on line 166 The corresponding code - lines 165-186: // try to connect to Canada Post server, for 2 second $fp = @fsockopen($host, $port, &$errno, &$errstr, 2); if ( $fp ) { fputs($fp, "$method $path HTTP/1.1\n"); fputs($fp, "Host: $host\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\n"); fputs($fp, "Content-length: " . strlen($data) . "\n"); if ($useragent) fputs($fp, "User-Agent: MSIE\n"); fputs($fp, "Connection: close\n\n"); if ($method == 'POST') fputs($fp, $data); while (!feof($fp)) $buf .= fgets($fp,128); fclose($fp); } else { $buf = '<?xml version="1.0" ?><eparcel><error><statusMessage>Cannot reach Canada Post Server.</statusMessage></error></eparcel>'; } return $buf; } Anyone with a similar outcome, or any insight would be very helpful. Quote
Druid6900 Posted October 10, 2006 Posted October 10, 2006 Yes, I just installed the same shipping module and I'm getting exactly the same Warning messages. Since I just downloaded OsCommerce and am developing my site, I don't know when the change took place. I would love to edit the .ini file, as suggested, as soon as I find the damn thing LOL Quote No Good Deed EVER Goes Unpunished
DuFF1 Posted October 24, 2006 Posted October 24, 2006 This error seem to be an old command no more supported in PHP 5.0 But I don't know how to change the command to be correct. Here's the line that need to be changed: $fp = @fsockopen($host, $port, &$errno, &$errstr, 2); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.