Hi,

I have acquia drupal installed on my pc running windows xp - this is a fresh install of the acquia drupal through their windows installer
no other module installed..just ctools and feeds
The default feed importer is enabled and I have not made any changes in its settings

whenever I try and create a feed I get the following error

* Download of http://drupal.org/node/feed failed with code 0.
* Could not retrieve title from feed.

I enabled default drupal aggregator module and succesfully imported feeds from the same feed to rule out an issue with my pc's setting

Please let me know what other info you will need to diagnose the issue

Comments

alex_b’s picture

Thanks for opening this separate request.

I've just tried http://drupal.org/node/feed with a local install using the latest dev from CVS and found no problems.

PHP version 5.2.6
curl library available.

Could you post your PHP version and whether or not curl is available php -i | grep curl ?

manuj_78’s picture

Here is additional info

Drupal 6.15
MySQL database 5.1.41
PHP 5.2.13
Web server Apache/2.2.14 (Win32) PHP/5.2.13
cURL library 7.20.0
jQuery UI 1.6

One more additional point which may help troubleshoot the issue - My pc sits behind a corporate proxy and I had to apply the patch at http://drupal.org/node/7881#comment-2586802

After applying the patch and filling in the info for proxy I did verify if it was working properly by enabling the default core aggregator module and reimporting the feed at http://drupal.org/node/feed and it was able to import the feed

alex_b’s picture

My curl library is 7.19.5.

Could you go into libraries/http_request.inc and return FALSE from http_request_use_curl() and test whether the problem persists? I'd like to see whether it's curl that's acting up or whether we have something else going on in Feeds that doesn't play well behind a proxy (I know that Pubsub won't work, but that's not the issue here).

manuj_78’s picture

Hi Alex,

Apologies for not replying yesterday.

Your suggestion seemed to have done the trick

After returning FALSE, I was succesfully able to import the feeds.

alex_b’s picture

So, it stands to find out why the heck curl wouldn't be able to download a feed while drupal_http_request (PHP's fread()) can.

What response do you get if you run a

> curl -I http://drupal.org/node/feed

I get:

HTTP/1.1 200 OK
Server: Apache
X-Powered-By: PHP/5.2.12-pl0-gentoo
X-Drupal-Cache: MISS
Last-Modified: Fri, 26 Mar 2010 15:16:02 +0000
Cache-Control: public, max-age=60
ETag: "1269616562-0"
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Vary: Cookie,Accept-Encoding
Content-Type: application/rss+xml; charset=utf-8
Content-Length: 54368
Date: Fri, 26 Mar 2010 15:32:20 GMT
X-Varnish: 1847510823 1847468865
Age: 978
Via: 1.1 varnish
Connection: keep-alive

manuj_78’s picture

The above command doesnt work and well its not supposed to as well i guess..i am on windows xp

'curl' is not recognized as an internal or external command,
operable program or batch file.

alex_b’s picture

Looking at #2 (says there's curl present) I'm assuming that all that's missing is curl in your $PATH. Can you dig it up?

manuj_78’s picture

Will try to find out today..Will have to do google search first on howto

By the way on a different topic...is there a possibility of setting defaults when inporting feeds..

example..Say I have 4 vocabs associated with a node type , each vocab is multiselect and required and has maybe 10-11 terms in each of them
So when I setup a feed import or maybe when I import a feed..is there a way to say that incase the incoming feeds categories dont match any of the terms in the corrospnding mapped vocab, then set a user selectable default term

kevinquillen’s picture

I get a lot of Download failed code -1003 error, even though my feed imported.

ifoundthetao’s picture

I was having this same problem. I'm working locally on a MAMP server with my sites set up as Virtual Hosts. We're behind a pretty fancy-schmancy network configuration here, so I wasn't sure if that had something to do with it or not. But once I had cURL return false, everything was golden.

It's beautiful.

Tank you, tank you, tank you. I'm not sure why it happened like that, but I'm going to set up a beta site on a live server to see how it goes.

Update:
The site worked wonderfully when I put it on the live server, until I updated the site. It's odd because I have cURL installed on the server. But when it returns false, it works fine.

stuart.crouch’s picture

Hi

Here at the Open University we are affected by this issue too. The cause is that we are behind a proxy server, and we aren't allowed to configure curl to go past the proxy. When trying to run curl from the command line an error occurs.

curl -I http://drupal.org/node/feed
curl: (7) couldn't connect to host

I cant remove curl as it is cloned from a standard linux machine, and curl is used to successfully access internal urls. I've patched the feeds module like everyone else to return false, but it would be nice to have a configuration option to decide whether to use curl or drupals http_get (also patched to allow access past the proxy server).

I'm happy to run any more tests you have or need regarding this.

Thanks
--
Stuart Crouch
(Open University Drupal Host Administrator)

alex_b’s picture

> The cause is that we are behind a proxy server, and we aren't allowed to configure curl to go past the proxy.

If you were allowed, how would that configuration look like?

dcrowder’s picture

I just ran into the same issue and upgraded the module to beta4 and it is working once again. Worth a try for those who trip over this issue in the future.

nibo’s picture

Hi there,
I had also the same problem with the proxy, but only disabling the use of curl in the feeds module didn't do the job. I had to also apply the proxy patch under http://drupal.org/node/735420 to make it work.

alex_b’s picture

Status: Active » Closed (duplicate)

Steven Jones suggests to make the usage of cUrl optional, I think that's a great idea and it would also address the issues discussed here.

I will mark this issue as duplicate as the new one is more general and encompasses this one:

#883342: Don't force usage of cURL

Durran’s picture

Hi,
I keep getting a similar error was womdering what had been found ?

Download of ftp://username:password@ftp.site.com/folder/folder2/feed.csv failed with code -1003