Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I installed UPS XML Rates 1.15a and all the updates and dependencies (fixes and other contributions)

 

 

Everything seems like working, except UPS XML.

 

on page checkout_shipping.php UPS XML gives me this error msg:

Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway : Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway

 

On top of the page;

 

Warning: exec(): Unable to fork [which curl] in c:\hosting\ ... \store\includes\modules\shipping\upsxml.php on line 618

Warning: exec(): Unable to fork [curl -d "<?xml version=\"1.0\"?> <AccessRequest xml:lang=\"en-US\"> <AccessLicenseNumber>XXXXXXXXXXXXXXXX</AccessLicenseNumber> <UserId>YYYYYYYYYYYY</UserId> <Password>ZZZZZZZZZZ</Password> </AccessRequest> <?xml version=\"1.0\"?> <TimeInTransitRequest xml:lang=\"en-US\"> <Request> <TransactionReference> <CustomerContext>Time in Transit</CustomerContext> <XpciVersion>1.0001</XpciVersion> </TransactionReference> <RequestAction>TimeInTransit</RequestAction> </Request> <TransitFrom> <AddressArtifactFormat> <PoliticalDivision2>Berkeley</PoliticalDivision2> <PoliticalDivision1>CA</PoliticalDivision1> <CountryCode>US</CountryCode> <PostcodePrimaryLow>94707</ in c:\hosting\ ... \store\includes\modules\shipping\upsxml.php on line 632

Warning: exec(): Unable to fork [which curl] in c:\hosting\ ... \store\includes\modules\shipping\upsxml.php on line 618

Warning: exec(): Unable to fork [curl -d "<?xml version=\"1.0\"?> <AccessRequest xml:lang=\"en-US\"> <AccessLicenseNumber>XXXXXXXXXXXXXXXX</AccessLicenseNumber> <UserId>YYYYYYYYYYYY</UserId> <Password>ZZZZZZZZZZ</Password> </AccessRequest> <?xml version=\"1.0\"?> <RatingServiceSelectionRequest xml:lang=\"en-US\"> <Request> <TransactionReference> <CustomerContext>Rating and Service</CustomerContext> <XpciVersion>1.0001</XpciVersion> </TransactionReference> <RequestAction>Rate</RequestAction> <RequestOption>shop</RequestOption> </Request> <PickupType> <Code>01</Code> </PickupType> <Shipment> <Shipper> <Address> <City>Berkeley</City> <StateProvinceCode>CA& in c:\hosting\ ... \store\includes\modules\shipping\upsxml.php on line 632

 

Line 618:		 exec('which curl', $curl_output);

 

Line 632:		exec($command, $xmlResponse);

 

 

And here is the log:

DATE AND TIME: 2005-09-26 16:08:09
UPS URL: https://wwwcie.ups.com:443/ups.app/xml/TimeInTransit
UPS REQUEST using exec(): <?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>XXXXXXXXXXXXXX</AccessLicenseNumber>
  <UserId>YYYYYYYYY</UserId>
  <Password>ZZZZZZZZ</Password>
</AccessRequest>
<?xml version="1.0"?>
<TimeInTransitRequest xml:lang="en-US">
  <Request>
   <TransactionReference>
	   <CustomerContext>Time in Transit</CustomerContext>
	   <XpciVersion>1.0001</XpciVersion>
   </TransactionReference>
   <RequestAction>TimeInTransit</RequestAction>
  </Request>
  <TransitFrom>
   <AddressArtifactFormat>
	   <PoliticalDivision2>Berkeley</PoliticalDivision2>
	   <PoliticalDivision1>CA</PoliticalDivision1>
	   <CountryCode>US</CountryCode>
	   <PostcodePrimaryLow>94707</PostcodePrimaryLow>
   </AddressArtifactFormat>
  </TransitFrom>
  <TransitTo>
   <AddressArtifactFormat>
	   <PoliticalDivision2>Greenbrae</PoliticalDivision2>
	   <PoliticalDivision1>CA</PoliticalDivision1>
	   <CountryCode>US</CountryCode>
	   <PostcodePrimaryLow>94904</PostcodePrimaryLow>
	   <PostcodePrimaryHigh>94904</PostcodePrimaryHigh>
   </AddressArtifactFormat>
  </TransitTo>
  <PickupDate>20050927</PickupDate>
  <ShipmentWeight>
   <UnitOfMeasurement>
	   <Code>LBS</Code>
   </UnitOfMeasurement>
   <Weight>10</Weight>
  </ShipmentWeight>
  <InvoiceLineTotal>
   <CurrencyCode>USD</CurrencyCode>
   <MonetaryValue>100</MonetaryValue>
  </InvoiceLineTotal>
</TimeInTransitRequest>

Error from cURL using exec() since there is no $xmlResponse
UPS RESPONSE using exec(): 
------------------------------------------
Time in Transit: 0
------------------------------------------
DATE AND TIME: 2005-09-26 16:08:09
UPS URL: https://wwwcie.ups.com:443/ups.app/xml/Rate
UPS REQUEST using exec(): <?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>XXXXXXXXXXXXXX</AccessLicenseNumber>
  <UserId>YYYYYYYYY</UserId>
  <Password>ZZZZZZZZ</Password>
</AccessRequest>
<?xml version="1.0"?>
<RatingServiceSelectionRequest xml:lang="en-US">
  <Request>
   <TransactionReference>
	   <CustomerContext>Rating and Service</CustomerContext>
	   <XpciVersion>1.0001</XpciVersion>
   </TransactionReference>
   <RequestAction>Rate</RequestAction>
   <RequestOption>shop</RequestOption>
  </Request>
  <PickupType>
   <Code>01</Code>
  </PickupType>
  <Shipment>
   <Shipper>
	   <Address>
		   <City>Berkeley</City>
		   <StateProvinceCode>CA</StateProvinceCode>
		   <CountryCode>US</CountryCode>
		   <PostalCode>94707</PostalCode>
	   </Address>
   </Shipper>
   <ShipTo>
	   <Address>
		   <City>Greenbrae</City>
		   <StateProvinceCode>CA</StateProvinceCode>
		   <CountryCode>US</CountryCode>
		   <PostalCode>94904</PostalCode>
	   </Address>
   </ShipTo>
   <Package>
	   <PackagingType>
		   <Code>02</Code>
	   </PackagingType>
	   <PackageWeight>
		   <UnitOfMeasurement>
			   <Code>LBS</Code>
		   </UnitOfMeasurement>
		   <Weight>41</Weight>
	   </PackageWeight>
	   <PackageServiceOptions>
		   <InsuredValue>
			   <CurrencyCode>USD</CurrencyCode>
			   <MonetaryValue>100</MonetaryValue>
		   </InsuredValue>
	   </PackageServiceOptions>
   </Package>
   <Package>
	   <PackagingType>
		   <Code>02</Code>
	   </PackagingType>
	   <PackageWeight>
		   <UnitOfMeasurement>
			   <Code>LBS</Code>
		   </UnitOfMeasurement>
		   <Weight>41</Weight>
	   </PackageWeight>
	   <PackageServiceOptions>
		   <InsuredValue>
			   <CurrencyCode>USD</CurrencyCode>
			   <MonetaryValue>100</MonetaryValue>
		   </InsuredValue>
	   </PackageServiceOptions>
   </Package>
  </Shipment>
  <CustomerClassification>
   <Code>01</Code>
  </CustomerClassification>
</RatingServiceSelectionRequest>

Error from cURL using exec() since there is no $xmlResponse
UPS RESPONSE using exec():

 

I read so many messages in the forum. But I could not find any solution. Has anyone found "the solution"?

 

p.s. I run OSC (2.2-MS2) on Windows

cURL: enabled (libcurl/7.11.2 OpenSSL/0.9.7g zlib/1.1.4)

HTTP Server: Microsoft-IIS/6.0

PHP Version: 4.4.0 (Zend: 1.3.0)

Posted
On top of the page;

 

Warning: exec(): Unable to fork [which curl] in c:\hosting\ ... \store\includes\modules\shipping\upsxml.php on line 618

Since cURL is enabled, why do you use exec (should be more like a last resort...). Did you try it with (somewhere around line 80)?

		$this->use_exec = '0';

There is a mention of this error in the Authorize.net thread by Brian Austin (note that part of that code is lifted from that contribution):

On windows with IIS if you have ever run the IIS Lockdown Tool it sets the permissions on CMD.EXE to "deny" for the IUSR_"Machine Name" account. cURL.exe is a command line tool and in order for PHP to use it the "IUSR_" account has to have "read and execute" permissions for CMD.EXE. The Unable to fork error will come up when you try and run any program that uses a command prompt in the windows environment.
Posted

Well, it is actually.

I also tried

 $this->use_exec = '1';

but didn't work either.

So now it is set to 0 again.

 

Thank you JanZ.

 

 

That must be something else!? Any idea?

 

What's this cURL by the way? Is it a part of PHP/perl?

This osC project is my first php project. I do ASP/MSSQL applications.

 

Even I know the logic of server-side languages/applications, php is, little different :)

Posted
I also tried
 $this->use_exec = '1';

but didn't work either.

So now it is set to 0 again.

OK, so something is wrong on the server side (see my earlier post).
What's this cURL by the way? Is it a part of PHP/perl?
From the cURL website: curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, TFTP, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. curl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks.. cURL is needed for the https connection with the UPS server.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...