Post by philofab » Sun Feb 12, 2012 5:10 am

Running OpenCart Version 1.5.1.3
Google Checkout Module "opencart-1-5-1-3-gcheckout-24.zip"
Hosted by GoDaddy.com
Cart URL is http://www.mohavebattery.com/
Callback URL is https://www.mohavebattery.com/index.php ... t/callback

I get this error and orders are not showing in OpenCart.

"We encountered an error trying to access your server at https://www.mohavebattery.com/index.php ... t/callback -- the error we got is Send failed with code: 401. Response body was: Failed to Get Basic Authentication Headers"

I've been fighting this for a couple days now. I have searched and found no answer.

Set to version 2.5 in Google
Notification as XML

What am I doing wrong?

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by philofab » Wed Feb 22, 2012 10:14 am

Anyone? I've had no luck getting this fixed. I posed on the Google Forum too.

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by showitoff » Sun Mar 04, 2012 6:46 am

I am having this exact problem. Anybody got any advice? It's driving me crazy!

Newbie

Posts

Joined
Sat Mar 03, 2012 1:53 pm

Post by philofab » Wed Mar 07, 2012 12:04 am

showitoff wrote:I am having this exact problem. Anybody got any advice? It's driving me crazy!

Are you on GoDaddy.com also? I have had zero luck.

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by philofab » Fri Mar 16, 2012 12:22 am

Code: Select all

2012-03-08 21:20:51 - PHP Warning:  unlink(/home/content/70/8163770/html/system/cache/cache.product.1.0.8.b4b3c4e147687fa60a6dd652fb6b7495.1331266850) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /home/content/70/8163770/html/system/library/cache.php on line 14
2012-03-08 21:20:51 - PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/session.php on line 11
2012-03-08 21:20:51 - PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/session.php on line 11
2012-03-08 21:20:51 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/index.php on line 175
2012-03-08 21:20:51 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/currency.php on line 45
2012-03-09 17:01:04 - PHP Warning:  unlink(/home/content/70/8163770/html/system/cache/cache.product.1.0.8.51fb4e7696788467d54bb90f6f086bad.1331337576) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /home/content/70/8163770/html/system/library/cache.php on line 14
2012-03-09 17:01:04 - PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/session.php on line 11
2012-03-09 17:01:04 - PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/session.php on line 11
2012-03-09 17:01:04 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/index.php on line 175
2012-03-09 17:01:04 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/currency.php on line 45
2012-03-13 0:03:14 - PHP Warning:  unlink(/home/content/70/8163770/html/system/cache/cache.product.1.0.8.29e6fd0ca90f72eaea51ca16d5527692.1331622177) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /home/content/70/8163770/html/system/library/cache.php on line 14
2012-03-13 0:03:14 - PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/session.php on line 11
2012-03-13 0:03:14 - PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/session.php on line 11
2012-03-13 0:03:14 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/index.php on line 175
2012-03-13 0:03:14 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/currency.php on line 45
2012-03-14 10:21:49 - PHP Warning:  unlink(/home/content/70/8163770/html/system/cache/cache.store.1331745617) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /home/content/70/8163770/html/system/library/cache.php on line 14
2012-03-14 10:21:49 - PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/session.php on line 11
2012-03-14 10:21:49 - PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/session.php on line 11
2012-03-14 10:21:49 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/index.php on line 175
2012-03-14 10:21:49 - PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/content/70/8163770/html/index.php:100) in /home/content/70/8163770/html/system/library/currency.php on line 45
I have this in my error log? Can anyone help?

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by showitoff » Mon Apr 02, 2012 11:51 am

Are you on GoDaddy.com also? I have had zero luck.
Not on GoDaddy, but I still can't find the right documentation to get this error resolved for myself. Any luck for you yet?

Newbie

Posts

Joined
Sat Mar 03, 2012 1:53 pm

Post by philofab » Tue Apr 03, 2012 1:18 am

Nothing. No help from anyone for me to figure out whats going on. I may just drop Google.

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by showitoff » Tue Apr 03, 2012 11:21 am

That's where we're at right now too. Just using PayPal until we can get this figured out, if it ever happens. But I've seen multiple posts on here with no responses for the same problem. Yikes. We might just bypass google all together if it's not going to get figured out.

Newbie

Posts

Joined
Sat Mar 03, 2012 1:53 pm

Post by JNeuhoff » Sat Apr 07, 2012 1:37 am

philofab wrote:Nothing. No help from anyone for me to figure out whats going on. I may just drop Google.
What messages are there in your Google's Integration Console?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by philofab » Thu Apr 19, 2012 1:15 am

Related order: xxxxxxxxxxxxxx
Time of occurrence: Apr 18, 2012 9:03:07 AM PDT
Error: We encountered an error trying to access your server at https://www.mohavebattery.com/index.php ... t/callback -- the error we got is Send failed with code: 401. Response body was: Failed to Get Basic Authentication Headers
More documentation for this error.
Warnings:
XML we sent:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<new-order-notification xmlns="http://checkout.google.com/schema/2" serial-number="423151454349036-00001-7">
  <buyer-billing-address>
    <email>REMOVED</email>
    <contact-name>REMOVED</contact-name>
    <company-name>REMOVED</company-name>
    <address1>REMOVED</address1>
    <address2>REMOVED</address2>
    <phone>REMOVED</phone>
    <fax></fax>
    <structured-name>
      <first-name>REMOVED</first-name>
      <last-name>REMOVED</last-name>
    </structured-name>
    <country-code>US</country-code>
    <city>REMOVED</city>
    <region>REMOVED</region>
    <postal-code>REMOVED</postal-code>
  </buyer-billing-address>
  <timestamp>2012-04-18T13:25:12.680Z</timestamp>
  <google-order-number>xxxxxxxxxxxxxxx</google-order-number>
  <order-summary>
    <total-chargeback-amount currency="USD">0.0</total-chargeback-amount>
    <google-order-number>423151454349036</google-order-number>
    <total-charge-amount currency="USD">0.0</total-charge-amount>
    <total-refund-amount currency="USD">0.0</total-refund-amount>
    <purchase-date>2012-04-18T13:25:12.000Z</purchase-date>
    <archived>false</archived>
    <shopping-cart>
      <items>
        <item>
          <item-weight value="0.2" unit="LB" />
          <tax-table-selector>Taxable Goods</tax-table-selector>
          <item-name>DPDT On-Off-On Non Momentary Toggle Switch Model:MB-001</item-name>
          <item-description>product #83</item-description>
          <unit-price currency="USD">6.99</unit-price>
          <quantity>1</quantity>
          <merchant-item-id>83</merchant-item-id>
        </item>
        <item>
          <item-weight value="0.2" unit="LB" />
          <tax-table-selector>Taxable Goods</tax-table-selector>
          <item-name>DPDT On-Off-On Non Momentary Motor Reversing Toggle Switch Model:MB-002</item-name>
          <item-description>product #84</item-description>
          <unit-price currency="USD">6.99</unit-price>
          <quantity>1</quantity>
          <merchant-item-id>84</merchant-item-id>
        </item>
      </items>
      <merchant-private-data>
        
      
        <reference>b9e9d03a689ef19832ffd0761302cf88</reference>
        
      
        <currency>USD</currency>
        
      
        <language-id>1</language-id>
        
    
      </merchant-private-data>
    </shopping-cart>
    <order-adjustment>
      <merchant-calculation-successful>false</merchant-calculation-successful>
      <merchant-codes />
      <shipping>
        <merchant-calculated-shipping-adjustment>
          <shipping-name>Flat Rate</shipping-name>
          <shipping-cost currency="USD">0.0</shipping-cost>
        </merchant-calculated-shipping-adjustment>
      </shipping>
      <total-tax currency="USD">0.0</total-tax>
      <adjustment-total currency="USD">0.0</adjustment-total>
    </order-adjustment>
    <buyer-id>xxxxxxxxxxxxxxx</buyer-id>
    <buyer-shipping-address>
      <email>REMOVED</email>
      <contact-name>REMOVED</contact-name>
      <company-name>REMOVED</company-name>
      <address1>REMOVED</address1>
      <address2>REMOVED</address2>
      <phone>REMOVED</phone>
      <fax></fax>
      <structured-name>
        <first-name>REMOVED</first-name>
        <last-name>REMOVED</last-name>
      </structured-name>
      <country-code>US</country-code>
      <city>REMOVED</city>
      <region>MN</region>
      <postal-code>REMOVED</postal-code>
    </buyer-shipping-address>
    <buyer-marketing-preferences>
      <email-allowed>false</email-allowed>
    </buyer-marketing-preferences>
    <promotions />
    <order-total currency="USD">13.98</order-total>
    <fulfillment-order-state>NEW</fulfillment-order-state>
    <financial-order-state>REVIEWING</financial-order-state>
  </order-summary>
  <shopping-cart>
    <items>
      <item>
        <item-weight value="0.2" unit="LB" />
        <tax-table-selector>Taxable Goods</tax-table-selector>
        <item-name>DPDT On-Off-On Non Momentary Toggle Switch Model:MB-001</item-name>
        <item-description>product #83</item-description>
        <unit-price currency="USD">6.99</unit-price>
        <quantity>1</quantity>
        <merchant-item-id>83</merchant-item-id>
      </item>
      <item>
        <item-weight value="0.2" unit="LB" />
        <tax-table-selector>Taxable Goods</tax-table-selector>
        <item-name>DPDT On-Off-On Non Momentary Motor Reversing Toggle Switch Model:MB-002</item-name>
        <item-description>product #84</item-description>
        <unit-price currency="USD">6.99</unit-price>
        <quantity>1</quantity>
        <merchant-item-id>84</merchant-item-id>
      </item>
    </items>
    <merchant-private-data>
      
      
      <reference>b9e9d03a689ef19832ffd0761302cf88</reference>
      
      
      <currency>USD</currency>
      
      
      <language-id>1</language-id>
      
    
    </merchant-private-data>
  </shopping-cart>
  <order-adjustment>
    <merchant-calculation-successful>false</merchant-calculation-successful>
    <merchant-codes />
    <shipping>
      <merchant-calculated-shipping-adjustment>
        <shipping-name>Flat Rate</shipping-name>
        <shipping-cost currency="USD">0.0</shipping-cost>
      </merchant-calculated-shipping-adjustment>
    </shipping>
    <total-tax currency="USD">0.0</total-tax>
    <adjustment-total currency="USD">0.0</adjustment-total>
  </order-adjustment>
  <buyer-id>xxxxxxxxxxxxxxxx</buyer-id>
  <buyer-shipping-address>
    <email>REMOVED</email>
    <contact-name>REMOVED</contact-name>
    <company-name></company-name>
    <address1>REMOVED</address1>
    <address2>REMOVED</address2>
    <phone>REMOVED</phone>
    <fax></fax>
    <structured-name>
      <first-name>REMOVED</first-name>
      <last-name>REMOVED</last-name>
    </structured-name>
    <country-code>US</country-code>
    <city>REMOVED</city>
    <region>MN</region>
    <postal-code>REMOVED</postal-code>
  </buyer-shipping-address>
  <buyer-marketing-preferences>
    <email-allowed>false</email-allowed>
  </buyer-marketing-preferences>
  <promotions />
  <order-total currency="USD">13.98</order-total>
  <fulfillment-order-state>NEW</fulfillment-order-state>
  <financial-order-state>REVIEWING</financial-order-state>
</new-order-notification>

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by JNeuhoff » Thu Apr 19, 2012 1:28 am

philofab wrote:Related order: xxxxxxxxxxxxxx
Time of occurrence: Apr 18, 2012 9:03:07 AM PDT
Error: We encountered an error trying to access your server at https://www.mohavebattery.com/index.php ... t/callback -- the error we got is Send failed with code: 401. Response body was: Failed to Get Basic Authentication Headers
More documentation for this error.
Warnings:
XML we sent:
It's possible that your server hasn't been configured to support basic authentication.

To narrow it down, add this into the catalog/controller/checkout/gcheckout.php:

Code: Select all

	function callback() {
		// make sure its posted
		if (strtoupper($this->request->server['REQUEST_METHOD']) != 'POST') {
			$this->response->redirect($this->url->link('common/home'));
		}
		ob_start();
		var_dump( $_SERVER );
		$this->log->write( ob_get_contents() );
		ob_end_clean();
		.....
Then test it again, and let me know what your system/logs/error.txt gets, in particular, whether the $_SERVER has the expected $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] values.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by philofab » Tue Apr 24, 2012 3:45 am

There is a syntax error in there... is that all of the code?

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by philofab » Tue Apr 24, 2012 3:59 am

Code: Select all

		ob_start();
      		var_dump( $_SERVER );
      		$this->log->write( ob_get_contents() );
      		ob_end_clean();
Nevermind, I figured out what you were asking/instructing. I added this to the callback function.

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by philofab » Tue Apr 24, 2012 4:01 am

Code: Select all

2012-04-23 13:00:50 - array(39) {
  ["TMPDIR"]=>
  string(28) "/home/content/70/8163770/tmp"
  ["PHPRC"]=>
  string(40) "/var/chroot/home/content/70/8163770/html"
  ["TEMP"]=>
  string(28) "/home/content/70/8163770/tmp"
  ["PHP_FCGI_CHILDREN"]=>
  string(1) "0"
  ["PATH"]=>
  string(29) "/sbin:/usr/sbin:/bin:/usr/bin"
  ["PWD"]=>
  string(12) "/web/cgi-bin"
  ["SHLVL"]=>
  string(1) "0"
  ["RAILS_ENV"]=>
  string(10) "production"
  ["SPI"]=>
  string(4) "TRUE"
  ["TMP"]=>
  string(28) "/home/content/70/8163770/tmp"
  ["PHP_FCGI_MAX_REQUESTS"]=>
  string(6) "100000"
  ["FCGI_ROLE"]=>
  string(9) "RESPONDER"
  ["SCRIPT_URL"]=>
  string(10) "/index.php"
  ["SCRIPT_URI"]=>
  string(39) "https://www.mohavebattery.com/index.php"
  ["HTTPS"]=>
  string(2) "on"
  ["CONTENT_TYPE"]=>
  string(30) "application/xml; charset=UTF-8"
  ["HTTP_USER_AGENT"]=>
  string(38) "Google Checkout Notification Agent 1.0"
  ["HTTP_HOST"]=>
  string(21) "www.mohavebattery.com"
  ["CONTENT_LENGTH"]=>
  string(4) "1482"
  ["HTTP_ACCEPT_ENCODING"]=>
  string(4) "gzip"
  ["SERVER_SIGNATURE"]=>
  string(79) "<address>Apache Server at www.mohavebattery.com Port 443</address>
"
  ["SERVER_SOFTWARE"]=>
  string(6) "Apache"
  ["SERVER_NAME"]=>
  string(21) "www.mohavebattery.com"
  ["SERVER_ADDR"]=>
  string(13) "184.168.42.19"
  ["SERVER_PORT"]=>
  string(3) "443"
  ["REMOTE_ADDR"]=>
  string(12) "74.125.19.26"
  ["DOCUMENT_ROOT"]=>
  string(40) "/var/chroot/home/content/70/8163770/html"
  ["SERVER_ADMIN"]=>
  string(26) "support@supportwebsite.com"
  ["SCRIPT_FILENAME"]=>
  string(50) "/var/chroot/home/content/70/8163770/html/index.php"
  ["REMOTE_PORT"]=>
  string(5) "45484"
  ["GATEWAY_INTERFACE"]=>
  string(7) "CGI/1.1"
  ["SERVER_PROTOCOL"]=>
  string(8) "HTTP/1.1"
  ["REQUEST_METHOD"]=>
  string(4) "POST"
  ["QUERY_STRING"]=>
  string(33) "route=checkout/gcheckout/callback"
  ["REQUEST_URI"]=>
  string(44) "/index.php?route=checkout/gcheckout/callback"
  ["SCRIPT_NAME"]=>
  string(10) "/index.php"
  ["HTTP_CONNECTION"]=>
  string(5) "close"
  ["PHP_SELF"]=>
  string(10) "/index.php"
  ["REQUEST_TIME"]=>
  string(10) "1335211250"
}


Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by JNeuhoff » Tue Apr 24, 2012 5:26 pm

That's what I thought. Your server has not been configured to support basic authentication, your $_SERVER does not contain the expected $_SERVER["PHP_AUTH_PW"] and $_SERVER["PHP_AUTH_USER"], even though the Google user agent ("Google Checkout Notification Agent 1.0") must have sent a request including the 'Authorization: Basic ' in its client request.

Ask your web host to reconfigure the server and/or PHP to support basic authentication.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by philofab » Wed Apr 25, 2012 2:58 am

I called godaddy to see if it was enabled. They couldn't tell me if the modules were installed in Apache or if AllowOveride was on.

I think I may be able to fix it with a .htaccess and .htpasswd but have not tired it yet. Getting the path correct on their servers seems to be difficult. Lots of simlinks and such.

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by JNeuhoff » Sat Apr 28, 2012 4:29 am

philofab wrote:I called godaddy to see if it was enabled. They couldn't tell me if the modules were installed in Apache or if AllowOveride was on.

I think I may be able to fix it with a .htaccess and .htpasswd but have not tired it yet. Getting the path correct on their servers seems to be difficult. Lots of simlinks and such.
You should change your webhost, godaddy usually has poor customer reviews.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by philofab » Sun Apr 29, 2012 7:45 am

JNeuhoff wrote:You should change your webhost, godaddy usually has poor customer reviews.
I've though about it but it's a bit of an undertaking to move 100+ domain names. I had Pair but I didn't care for them.

If I move again I will just setup a Linux server here in the shop with Apache on it.

Newbie

Posts

Joined
Thu Sep 22, 2011 8:44 am

Post by jezwebb » Thu Aug 02, 2012 9:19 pm

I think I'm in the same boat here. Can you elaborate what needs to be present / set on the server to support Basic Authentication for this situation? The server supports normal htaccess basic auth.

Regards,

Jeremy.

Newbie

Posts

Joined
Thu Aug 02, 2012 9:17 pm

Post by JNeuhoff » Fri Aug 03, 2012 1:07 am

jezwebb wrote:I think I'm in the same boat here. Can you elaborate what needs to be present / set on the server to support Basic Authentication for this situation? The server supports normal htaccess basic auth.

Regards,

Jeremy.
Check your server, as outlined in this previous message.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 69 guests