Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 127

PostPosted: Tue Sep 09, 2008 8:47 am Reply with quote

montego wrote:
I suspect the real reason is the massive number of IP addresses that will come back in the results list and ALL of those have to be buffered and then run through the URL "tapping", which uses string search and replaces on a massive scale, thereby the attempts to allocate even yet more memory.

These are all good ideas. Thanks guys!


Does the entire content of a page pass through Shortlinks? I thought it was only the link of the page.
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 375

PostPosted: Tue Sep 09, 2008 10:47 am Reply with quote

I hadn't thought of that montego, hmm, sounds like the culprit.
 
View user's profile Send private message
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 127

PostPosted: Tue Sep 09, 2008 2:13 pm Reply with quote

I have tried to tap this link, but failed.

In .htaccess I added:

RewriteRule ^ftopic-ip-([0-9]*)-([0-9]*).html modules.php?name=Forums&file=modcp&mode=ip&p=$1&t=$2 [L]


In GT-Forums.php

'"(?<!/)modules.php\?name=Forums&amp;file=modcp&amp;mode=ip&amp;p=([0-9]*)&amp;t=([0-9]*)"',


Can this failure provide some info?
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1282

PostPosted: Tue Sep 09, 2008 7:49 pm Reply with quote

Quote:
Does the entire content of a page pass through Shortlinks? I thought it was only the link of the page.


Yes, as I stated above, the entire page is buffered using the output buffer functions and then ShortLinks runs through the buffer with search and replace. Normally this isn't an issue because pages are generally quite small in size. Not so in this case.

The tapping of the link has nothing to do with the error. However, I cannot comment on whether your "tap" is correct or not because you have not shown me the $urlout line for that "tap"....

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 127

PostPosted: Tue Sep 09, 2008 11:22 pm Reply with quote

Thanks. Here is the original link from my local test server:

http://localhost/nuke/modules.php?name=Forums&file=modcp&mode=ip&p=92921&t=9584&sid=7c4f6302338f756f15d5bd6ddcae7038
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1282

PostPosted: Wed Sep 10, 2008 7:13 am Reply with quote

No, I mean the $urlout line for that tap you made in GT-Forums.php...

You had given above only the $urlin line.
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1282

PostPosted: Wed Sep 10, 2008 7:23 am Reply with quote

Ok, I have a potential "fix" for you to try.

=== OPEN FILE ===

mainfile.php

=== FIND CODE ===

Code:

if (isset($tnsl_bUseShortLinks) && $tnsl_bUseShortLinks && file_exists(INCLUDE_PATH.'includes/tegonuke/shortlinks/shortlinks.php')) {
    define('TNSL_USE_SHORTLINKS', TRUE);
    @include_once(INCLUDE_PATH.'includes/tegonuke/shortlinks/shortlinks.php');
}


=== REPLACE WITH ===

Code:

if ((isset($name) && isset($file)) && ($name == 'Forums' && $file == 'modcp')) {
} else {
   if (isset($tnsl_bUseShortLinks) && $tnsl_bUseShortLinks && file_exists(INCLUDE_PATH.'includes/tegonuke/shortlinks/shortlinks.php')) {
      define('TNSL_USE_SHORTLINKS', TRUE);
      @include_once(INCLUDE_PATH.'includes/tegonuke/shortlinks/shortlinks.php');
   }
}


=== DONE ===

Now, what this will do is keep ShortLinks from even buffering any Moderator Control Panel type page. There will be no impact to Search Engine crawling and caching (since anonymous users cannot be moderators).

However, just so you know, this one IP look up functionality was never meant to be used on anonymous user. Eventually, you will still blow your memory limitation and it will have nothing to do with ShortLinks.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 127

PostPosted: Wed Sep 10, 2008 11:22 pm Reply with quote

Many thanks! I have just tested it and it worked. I looked at this error at phpbb.com forum and found an old post, which showed that it had happened earlier to someone with only 8 MB of memory (without Shortlinks of course).
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1282

PostPosted: Thu Sep 11, 2008 7:22 am Reply with quote

BTW, for the RavenNuke'ers out there that run into this, I have fixed this already for the upcoming 2.3.0 release.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch