Go Back   Pligg CMS Forum > Pligg Development > Bug Report

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-31-2006, 06:27 AM
New Pligger
 
Join Date: Mar 2006
Location: sandakan
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Posible problem in HTTPRequest->DownloadToString

hi, I found a problem in HTTPRequest->DownloadToString function. When submitting url pointing to a large chunk of data... eventually it will not stop looping and could draw out all of my hosting bandwidth.

I've made a quick fix(not necesary best fix ) to limit the download size to 10k until you guys more capable of making a better fix temporarily.

in libs/link.php, class HTTPRequest, method DownloadToString
Code:
      $read_count =0;
        /* modified read max 10k */
       while(is_resource($this->_fp) && $this->_fp && !feof($this->_fp) && 
$read_count++ < 10) {
read more

Digg It
Reply With Quote
  #2 (permalink)  
Old 03-31-2006, 06:51 AM
Yankidank's Avatar
Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 1,828
Thanks: 110
Thanked 183 Times in 129 Posts
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
Good find. I noticed this a while ago when experimenting with linking to mp3 files and generating a podcast rss feed over a month ago. Unfortunately I didn't take note of this problem, better caught now than later when someone gets stuck with a huge bandwidth bill. I enjoyed reading the blog post, nice job.
__________________
Need a Pligg Host?
Get 3 free months
when you buy a year of hosting.
Use the coupon PLIGG at either...
MidPhase hosting starting at $7.95/month.
ANhosting hosting starting as low as $4.95/month.

Last edited by Yankidank; 03-31-2006 at 06:54 AM..
Reply With Quote
  #3 (permalink)  
Old 01-02-2008, 10:37 AM
New Pligger
Pligg Version: latest
Pligg Template: none
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Is there a tep-by-step solution to this problem?

Hi all,

Is there a tep-by-step solution to this problem? as having major issues with it all.

I get the error:
Fatal error: Call to undefined method HttpRequest:ownloadToString() in .../libs/link.php on line 69

As was reporting that HttpRequest could not be redefined (so commented it out) but I now get the above error?

Im using php 5

Any ideas - as really stuck!

cheers - Jamie
Reply With Quote
  #4 (permalink)  
Old 04-25-2008, 07:21 AM
New Pligger
 
Join Date: Mar 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Undefined HttpRequest::DownloadToString()

Call to undefined method HttpRequest::DownloadToString() in ...libs\link.php on line 57

I have the same problem.
Apparently the original HTTPRequest class does not have this method defined.

The workaround for this was to rename the class and the references to it.

Last edited by devplayer; 04-25-2008 at 10:06 AM..
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with template in IE7 xsillence General Help 2 08-29-2007 11:30 PM
Weird problem with seeing images SteveF General Help 6 08-12-2007 08:59 AM
voting problem & comments problem DailyResearch Bug Report 12 07-09-2007 08:11 PM
Problem with server down erico General Help 1 06-26-2007 10:26 PM
Problem form doesn't work! nabil Bug Report 1 04-01-2006 08:53 PM


Search Engine Friendly URLs by vBSEO 3.2.0