Hiya Guys,
I am so sorry to keep bugging like this, I know it tends to get annoying. I did fix the other errors myself (had about 10 of them!) but this one, I don't know. Error comes up on line 1210. Here is from about 1190 and down.
$request .= '</IntlRateV2Request>';
$request = 'API=IntlRateV2&XML=' . urlencode($request);
$usps_server = 'production.shippingapis.com';
$api_dll = 'shippingAPI.dll';
$body = '';
if (!class_exists('httpClient')) {
include('includes/classes/http_client.php');
}
$http = new httpClient();
if ($http->Connect('production.shippingapis.com', 80)) {
$http->addHeader('Host', 'production.shippingapis.com);
$http->addHeader('User-Agent', 'osCommerce'); <--------------- This is line 2010
$http->addHeader('Connection', 'Close');
if ($http->Get('/shippingapi.dll?' . $request)) $body = $http->getBody();
$http->Disconnect();
} else {
$body = '<Error><Number></Number><Description>' . MODULE_SHIPPING_USPS_TEXT_CONNECTION_ERROR . '</Description></Error>';
}
$doc = XML_unserialize($body);
$quotes = array();
if (isset($doc['Error'])) return array('error' => $doc['Error']['Number'] . ' ' . $doc['Error']['Description']);
if (isset($doc['IntlRateV2Response']['Package']['Error'])) return array('error' => $doc['IntlRateV2Response']['Package']['Error']['Number'] . ' ' . $doc['IntlRateV2Response']['Package']['Error']['Description']);
if (isset($doc['IntlRateV2Response']['Package'][0]['Error'])) return array('error' => $doc['IntlRateV2Response']['Package']['Error'][0]['Number'] . ' ' . $doc['IntlRateV2Response']['Package'][0]['Error']['Description']);
if (isset($doc['IntlRateV2Response']['Package']['Service']['SvcDescription'])) { // single mail service response
$tmp = $this->_decode_intl_response($doc['RateV4Response']['Package']['Service'], $nonuspsinsurancecost, $pkg['item_price']);
if (!empty($tmp)) $quotes[$tmp['id']] = $tmp;
} elseif (isset($doc['IntlRateV2Response']['Package']['Service'][0])) { // multiple mailing services returned
foreach ($doc['IntlRateV2Response']['Package']['Service'] as $mailsvc) {
if (isset($mailsvc['SvcDescription'])) {
$tmp = $this->_decode_intl_response($mailsvc, $nonuspsinsurancecost, $pkg['item_price']);
if (!empty($tmp)) $quotes[$tmp['id']] = $tmp;
}
}
Thanks guys. I am trying to see if at least the Paypal orders hit the database, so it will narrow down the issue to the linkpoint module itself. I was working on the orders but all changes didn't fix anything, and like someone else said, the coding was a mess. I don't want to keep messing with those php's if in the end, it is ultimately an issue with the linkpoint module.
Latest News: (loading..)
Parse error: syntax error, unexpected T_STRING in /home/mtgman5/public_html/includes/modules/shipping/usps.php on line 1210
Started by MTG Mania, Aug 02 2012 04:47 PM
parse error
4 replies to this topic
#1
Posted 02 August 2012 - 04:47 PM
#2
Posted 02 August 2012 - 04:51 PM
Never mind we found the issue. $http->addHeader('Host', 'production.shippingapis.com); was missing an quotation at the end.
#3
Posted 02 August 2012 - 04:51 PM
in line 1209 change this
I suggest you to start using a proper php editor with syntax highlighting
$http->addHeader('Host', 'production.shippingapis.com);
to this
$http->addHeader('Host', 'production.shippingapis.com');
I suggest you to start using a proper php editor with syntax highlighting
Community profile | Partner page | NEW : Feedback Chanel
#4
Posted 02 August 2012 - 10:38 PM
multimixer, on 02 August 2012 - 04:51 PM, said:
in line 1209 change this
I suggest you to start using a proper php editor with syntax highlighting
$http->addHeader('Host', 'production.shippingapis.com);
to this
$http->addHeader('Host', 'production.shippingapis.com');
I suggest you to start using a proper php editor with syntax highlighting
Do you know of any good ones? we were using phpchecker, but that doesn't work all that great.
#5
Posted 12 August 2012 - 10:58 PM
I use the ViM editor. It color codes the syntax, and your omitted ' sticks out like a sore thumb. It's also an excellent editor (though not to everyone's liking).









