Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Using google base module...


macatticus

Recommended Posts

Posted

I've been using the automatic store feeder contribution (STORE FEEDS V3.2a) and I've been having a lot of problems. First, we had to set up a way to send the ftp requests to google base using cURL which I have done by adding the following to my froogle_us.php file (and commenting out the existing ftp script)...

 $timeout = 60;
$size = filesize($OutFile);
$ftp_server = 'ftp://' . $ftp_server2 . ':21/' . $destination_file;

$fp = fopen($OutFile, "r");

$ch = curl_init();
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt($ch, CURLOPT_PROXY,"proxy.shr.secureserver.net:3128");
curl_setopt($ch, CURLOPT_URL, $ftp_server);
curl_setopt($ch, CURLOPT_INFILE, $fp);
curl_setopt($ch, CURLOPT_INFILESIZE, $size);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_UPLOAD, 1);
curl_setopt($ch, CURLOPT_USERPWD, $ftp_user_name . ':' . $ftp_user_pass);
curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout);

$ftp = curl_exec ($ch);
if (curl_errno($ch)) {
  $error_from_curl = sprintf('Error [%d]: %s', curl_errno($ch), curl_error($ch));
//	print $error_from_curl;
}
//  print "<pre>";
//  print_r(curl_getinfo($ch));
//  print "\n\n cURL error number:" .curl_errno($ch);
//  print "\n\n cURL error:" . curl_error($ch);
//  print "</pre>";
curl_close ($ch);
fclose($fp);

That seems to work fine but when I run the script I get this...

File completed: froogle.txt

ERROR

The requested URL could not be retrieved

 

An FTP authentication failure occurred while trying to retrieve the URL: ftp://uploads.google.com/froogle.txt

 

Squid sent the following FTP command:

 

PASS <yourpassword>

 

and then received this reply

 

Login incorrect.

 

Your cache administrator is webmaster.

I am sure that all my login information is right... Are there any helpful tips you can give me? Or perhaps an all in one link to a google base uploader that already uses cURL :rolleyes:

Posted

Maybe try saving the file to a writable (chmod 777) directory in /public_html/store/catalog/ (eg /public_html/store/catalog/feeds) instead of saving them in an FTP directory (/public_ftp/the_path_you_are_using).

 

In short, the feed scripts are in /store/catalog/admin. They create feed files in /public_html/store/catalog/feeds. The script then FTP's the feed from /public_html/store/catalog/feeds to Google.

 

The way you have it right now, is something like.

 

The feed scripts are in /store/catalog/admin. They create feed files in /public_ftp/the_path_you_are_using. Then the script tries to FTP the feed from your FTP directory (which requires login, where as if it's in catalog, it doesn't) to Google.

Posted

I*'m tired...

 

Just noticed "An FTP authentication failure occurred while trying to retrieve the URL: ftp://uploads.google.com/froogle.txt"

 

It appears that your trying to retrieve froogle.txt instead of sending. Maybe try taking off the "/froogle.txt".

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...