Welcome to Geeklog, Anonymous Saturday, November 30 2024 @ 07:46 am EST
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
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
8
10
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
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
$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.
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.
14
6
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
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
14
8
Quote
All times are EST. The time is now 07:46 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