UPS failed to show Quote (Hosting issue)

Posts: 11
Joined: 01/28/2008

is it possible to use the same UPS account on the other ubercart project?

I have first ubercart project, and it was sucesfull to get UPS quote rate(trial peoject)

But i just have the second project from client to build e-commerce, and i just use my UPS account to test if the UPS module setup correctly. But It failled to report the Quote.

When i turn on debug information, it report:

<?xml version="1.0" encoding="UTF-8"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>EC1E24497B057ECC</AccessLicenseNumber>
  <UserId>rsugihar</UserId>
  <Password>******</Password>
</AccessRequest>

<?xml version="1.0" encoding="UTF-8"?>
<RatingServiceSelectionRequest xml:lang="en-US">
  <Request>
    <TransactionReference>
      <CustomerContext>Complex Rate Request</CustomerContext>
      <XpciVersion>1.0001</XpciVersion>
    </TransactionReference>
    <RequestAction>Rate</RequestAction>
    <RequestOption>rate</RequestOption>
  </Request>
  <PickupType>
    <Code>01</Code>
  </PickupType>
  <CustomerClassification>
    <Code>01</Code>
  </CustomerClassification>
  <Shipment>
    <Shipper>
      <ShipperNumber>6WY241</ShipperNumber>
      <Address>
        <City>culver</City>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>90064</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </Shipper>
    <ShipTo>
      <Address>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>92803</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipTo>
    <ShipFrom>
      <Address>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>92064</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipFrom>
    <ShipmentWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>1.0</Weight>
    </ShipmentWeight>
    <Service>
      <Code>12</Code>
      <Description>UPS 3-Day Select</Description>
    </Service>
    <Package><PackagingType><Code>02</Code></PackagingType><Dimensions><UnitOfMeasurement><Code>IN</Code></UnitOfMeasurement><Length>1.00</Length><Width>1.00</Width><Height>2.00</Height></Dimensions><PackageWeight><UnitOfMeasurement><Code>LBS</Code><Description>Pounds</Description></UnitOfMeasurement><Weight>1.0</Weight></PackageWeight><PackageServiceOptions><InsuredValue><CurrencyCode>USD</CurrencyCode><MonetaryValue>22.5</MonetaryValue></InsuredValue></PackageServiceOptions></Package></Shipment>
</RatingServiceSelectionRequest>

Although first peoject and second project has different items , i have same setup for UPS account.
I admit that the first installation (2nd project) was with Ubercart beta 5, but i just override it with beta 6 2 days ago.
Is it the reason ? Or i need to do something like 'update.php' after override it with beta 6 ?
I've been trying to solve this issue for 2 days, but have no good result.

Any suggestion would be appreciated.

-akira

Posts: 11
Joined: 01/28/2008

Do you think that i've setup correctly for UPS account ? Since i don;t see any 'error' words in the XML.

Anyone who has the same experience ?
I did uninstall shipping module, and re-install them again, but no luck.

Posts: 1850
Joined: 08/07/2007
AdministratoreLiTe!

All that XML is just what you're sending to UPS. I don't see any response from them. I would think that a lack of response would cause a PHP error or something. It's really weird that all you get is your request.

Take a look through Watchdog, PHP error log, and the Javascript console with Firebug. Surely one of those will have clues.

Posts: 11
Joined: 01/28/2008

Hi lyle,

you've got PM.

Posts: 11
Joined: 01/28/2008

It must be something wrong with the hosting setup.

Because when i setup the Drupal+ubercart into a new domain name with different
hosting, everything works well.

Anyone has the same problem ??

Please help me....i need to turn this project today.
But still has problem with UPS shipping.

Here is the comparison (same code)
http://dirtyredgear.com/shop/

and

http://vistadigitaltech.info/

NB: the hosting with UPS Error(can;t send data to UPS) is under 'reseller hosting'.
Configuration:
Php 5.2.5
Apache/1.3.39 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.30 OpenSSL/0.9.7a

Posts: 1850
Joined: 08/07/2007
AdministratoreLiTe!

Maybe the cache tables are out of date, particularly cache_workflow_ng. I've seen that cause some very strange things. I hope that's it because I don't see what else can be wrong. Checking mod_ssl was going to be my next suggestion. Sad

At this point it might be time to put some debug lines in the code itself. I'd start at the beginning of uc_ups_quote() to see if it's actually being called ever. Use drupal_set_message() so it won't mess up the normal functioning, though you'll have to refresh the cart page to see the messages.

Posts: 11
Joined: 01/28/2008

I tried to goto uc_ups.module. And in the uc_ups_quote() function,i put "drupal_set_message('

'. print_r($quotes, true) .'

');" right before return $quotes;

I'm not sure if i do the right thing to do what Lyle suggested.

And here is the result:

Array
(
    [12] => Array
        (
            [debug] => <?xml version="1.0" encoding="UTF-8"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>EC1E24497B057ECC</AccessLicenseNumber>
  <UserId>rsugihar</UserId>
  <Password>*****</Password>
</AccessRequest>

<?xml version="1.0" encoding="UTF-8"?>
<RatingServiceSelectionRequest xml:lang="en-US">
  <Request>
    <TransactionReference>
      <CustomerContext>Complex Rate Request</CustomerContext>
      <XpciVersion>1.0001</XpciVersion>
    </TransactionReference>
    <RequestAction>Rate</RequestAction>
    <RequestOption>rate</RequestOption>
  </Request>
  <PickupType>
    <Code>01</Code>
  </PickupType>
  <CustomerClassification>
    <Code>01</Code>
  </CustomerClassification>
  <Shipment>
    <Shipper>
      <ShipperNumber>6WY241</ShipperNumber>
      <Address>
        <City>Poway</City>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>92064</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </Shipper>
    <ShipTo>
      <Address>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>9</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipTo>
    <ShipFrom>
      <Address>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>91803</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipFrom>
    <ShipmentWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>4.0</Weight>
    </ShipmentWeight>
    <Service>
      <Code>12</Code>
      <Description>UPS 3-Day Select</Description>
    </Service>
    <Package><PackagingType><Code>02</Code></PackagingType><Dimensions><UnitOfMeasurement><Code>IN</Code></UnitOfMeasurement><Length>2.00</Length><Width>2.00</Width><Height>2.00</Height></Dimensions><PackageWeight><UnitOfMeasurement><Code>LBS</Code><Description>Pounds</Description></UnitOfMeasurement><Weight>4.0</Weight></PackageWeight><PackageServiceOptions><InsuredValue><CurrencyCode>USD</CurrencyCode><MonetaryValue>64.99</MonetaryValue></InsuredValue></PackageServiceOptions></Package></Shipment>
</RatingServiceSelectionRequest>

What does code above mean ? No data was sent to UPS server ?

-akira

Posts: 1850
Joined: 08/07/2007
AdministratoreLiTe!

OK. Now put

<?php
  drupal_set_message
('<pre>'. print_r($resp, true) .'</pre>');
?>

on line 887. The line that's actually making the request is being done, but this will show us what's actually happening.

Posts: 11
Joined: 01/28/2008

Lyle,

You are right, that there is some errors.

    *
      stdClass Object
      (
          [error] => -1226988884 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
          [code] => 1226988884
      )

    *
      stdClass Object
      (
          [error] => -1226991860 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
          [code] => 1226991860
      )

    *

      stdClass Object
      (
          [error] => -1226989392 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
          [code] => 1226989392
      )

    *

      stdClass Object
      (
          [error] => -1226884500 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
          [code] => 1226884500
      )

    *

      stdClass Object
      (
          [error] => -1226887740 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
          [code] => 1226887740
      )

    *

      stdClass Object
      (
          [error] => -1226885176 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
          [code] => 1226885176
      )

But i don;t understand the meaning of those errors.

appreciate your help,
-akira

Posts: 659
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

On your web server, PHP has to be built with the flag --with-openssl. You currently don't have SSL support in PHP, and UPS quotes needs that.

--

<tr>.

Posts: 87
Joined: 08/08/2007
Getting busy with the Ubercode.Not Kulvik

I ran into this problem with a client system -- I'm thinking it'd be good to make a bug report to check for SSL and warn in the ubercart status box that --with-openssl is missing

Posts: 659
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

Yes, it would be nice to catch the error up front. However, it's not the UPS module per se that requires SSL, it's Drupal core. OpenSSL is required by drupal_http_request() whenever an HTTPS URL is requested. So I think this should be checked at a higher level in the food chain, so to speak. Practically, I think this means that Drupal should have OpenSSL as a dependency. But I guess Ubercart could take some defensive measures and display the status/error message at admin/logs/status rather than leave it to each individual shipping module (or other module requiring HTTPS) to deal with on its own - putting this into Ubercart would be a *lot* easier than getting Drupal fixed.

--

<tr>.