| Author |
Message |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Tue Sep 09, 2008 8:47 am |
|
| 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. |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 375
|
Posted:
Tue Sep 09, 2008 10:47 am |
|
I hadn't thought of that montego, hmm, sounds like the culprit. |
| |
|
|
 |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Tue Sep 09, 2008 2:13 pm |
|
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&file=modcp&mode=ip&p=([0-9]*)&t=([0-9]*)"',
Can this failure provide some info? |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1282
|
Posted:
Tue Sep 09, 2008 7:49 pm |
|
| 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 |
|
|
 |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Tue Sep 09, 2008 11:22 pm |
|
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1282
|
Posted:
Wed Sep 10, 2008 7:13 am |
|
No, I mean the $urlout line for that tap you made in GT-Forums.php...
You had given above only the $urlin line. |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1282
|
Posted:
Wed Sep 10, 2008 7:23 am |
|
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 |
|
|
 |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Wed Sep 10, 2008 11:22 pm |
|
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). |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1282
|
Posted:
Thu Sep 11, 2008 7:22 am |
|
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 |
|
|
 |
|
|