0

I cannot get RSS feed to show on Drupal 7.14 page, feed does not show any items. Feed url: http://www.engadget.com/rss.xml
I added feed url in Feed aggregator with no problems, and feed name is shown in 'Feed overview' list, but when I clicked on 'update items' link, I got message:

"The feed from Gadgets seems to be broken, because of error "0 Error opening socket tcp://www.engadget.com:80. There is no new syndicated content from Gadgets."

It does not show any items. I tried to run cron, but this did not help. I tested the validity of feed in RSS validator, and it shows the feed is valid.

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
fxgreen
  • 424
  • 1
  • 10
  • 24
  • 1
    Please post the code that's supposed to display the RSS feed. – Matt Aug 02 '12 at 14:44
  • I am just using Feed Aggregator module that is included in Drupal core, not my own code. A fresh Drupal 7.14 installation on shared hosting. – fxgreen Aug 02 '12 at 21:41

1 Answers1

1

Is that the only feed that's happening on? You might want to also check the permissions, both within Drupal and in your website's tmp/cache folders.

Update 2012-08-03 09:25 GMT-6: Yep, as it sounded, it sounds like a configuration issue with your host:

"In D7 - drupal_http_request() uses the php function stream_socket_client(). In my particular situation, my host provider had ftp_connect() enabled but had disabled a whole bunch of native php functions which they viewed as security risks."

Node 1016980 from Drupal.org

"D7 uses the functions stream_socket_client(), fread(), fwrite(), stream_set_timeout(), and stream_get_meta_data(). [...] In my case (as it turns out), my hosting provider had disabled [...] stream_socket_client(). My host provider was kind enough to enable this function (after I told them it was now part of Drupal 7 core) but they offered the opinion that this was a security compromise."

"A word or warning", Drupal API Documentation

Work with them or switch hosts. You can test your site on a local Drupal appliance like QuickStart or AquiaDev (local virtual boxes that you can develop and test Drupal sites on.)

roberthernandez
  • 524
  • 3
  • 10
  • this happens with any feed, as I can see. Aggregator permissions in "View news feeds" have been set correctly, I checked boxes for all users, so its OK. Forgot to mention, before aboved info message, there is error notice shown" `Notice: Undefined variable: errno in drupal_http_request() (line 835 of /home/mysite/public_html/includes/common.inc). Notice: Undefined variable: errstr in drupal_http_request() (line 836 of /home/mysite/public_html/includes/common.inc).` Does Feed Aggregator module requires that web hosting had a certain PHP settings enabled? I'm on shared hosting. – fxgreen Aug 02 '12 at 21:31
  • Does your Admin > Reports page show any errors under **HTTP request status Fails**? This is generally caused by memory/resource limits or execution timeouts. – roberthernandez Aug 03 '12 at 14:25
  • Yes, in Admin > Reports show `HTTP request status: Fails`. "Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality.This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services. If you are certain that Drupal can access web pages but you are still seeing this message, you may add $conf['drupal_http_request_fails'] = FALSE; to the bottom of your settings.php file. – fxgreen Aug 03 '12 at 14:57
  • In addition, show alert note: `Module and theme update status: Failed to get available update data`. "There was a problem checking available updates for your modules or themes. See the available updates page for more information and to install your missing updates." Same for Drupal core updates. The hosting I'm tried to run Drupal is x10hosting.com – fxgreen Aug 03 '12 at 14:57
  • Yep, your problem (and solution) lies in a restricted server config (not a bad thing, just something you have to work through). The two links are part of longer threads that will help you identify exactly where the restriction lies so you can work with your host. The easiest validation of this is to test your site on another host OR in a local virtual appliance that's tested for Drupal (e.g. QuickStart or AquiaDev). – roberthernandez Aug 03 '12 at 15:13
  • 1
    The provider has enabled stream_socket_client function, and RSS feeds now working properly. – fxgreen Aug 07 '12 at 22:30