Welcome to Geeklog, Anonymous Saturday, April 20 2024 @ 06:17 am EDT

Geeklog Forums

Unable to aquire feed reader


Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Is there a way to set a timeout limit for feed aquisition on portal block ?

The feed I was trying to aquire was not available and the portal block freezed my geeklog site.

Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
I looked at the code and it doesn't look like we allow a way to set a timeout. This should be done and we should probably update the code to use HTTP_Request2.

Look in the paserfactory.class.php file at the _getFeed function (line 180). Change the line 182 to

Text Formatted Code

$req = new HTTP_Request($url, array('allowRedirects' => true, 'readTimeout' => 2));
 


This should set it to timeout at 2 seconds. I haven't tested this but let me know if it works.

For more information on this pear library you can also look at:

http://pear.php.net/package/HTTP_Request/docs/latest/HTTP_Request/HTTP_Request.html

Tom

One of the Geeklog Core Developers.
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Tom,

Thanks for the tip.: I don't know if it works because the feed I needed is now fully available, but yes it can be a nice feature to avoid complete site freeze.

Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

cokee88

Forum User
Newbie
Registered: 09/14/11
Posts: 4
Thank you for this easy tip. I will also apply this method to solve the issues.
 Quote

All times are EDT. The time is now 06:17 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content