| Author |
Message |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Sun Sep 07, 2008 8:10 am |
|
The two last days I sometimes get this error message from Shortlinks, when I try to look at the IP-address of a post in the forum:
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 2285529 bytes) in /includes/tegonuke/shortlinks/shortlinks.php on line 209 |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1281
|
Posted:
Sun Sep 07, 2008 8:23 am |
|
Looks like your site is growing in size and/or memory requirements. What have you added lately? Any forum mods?
ShortLinks has to buffer the output as well as do large search and replace functions, which takes more and more memory as your site grows.
You could try adding something like this to your .htaccess file:
php_value memory_limit 24M
This may have to be in a php.ini file if PHP directives are not allowed within your .htaccess file. However, you would need to figure out which scripts are having the issues and place a php.ini with that directive in each of the directories that those script files reside. |
_________________ “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:
Sun Sep 07, 2008 3:15 pm |
|
Thanks. I have not made any big changes in the forum lately with exception of link to my home index.php in viewtopic_body.tpl. It is months since I added the Shoutbox module.
I tried to add the statement you suggested in .htaccess.
Put it in modules/Forums and /includes/tegonuke/shortlinks ,but the error persisted and the memory limit did not change. Interestingly. the avatars vanished from the posts in the forum. They returned when I removed the .htaccess from modules/Forums |
| |
|
|
 |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Sun Sep 07, 2008 4:13 pm |
|
I have looked more into this problem. This error does not occur always, when I try to check the IP-address in a post, but only sometimes and in certain messages from guests. The strange thing is that IP for moderator is not tapped. It is like this:
http://www.site.com/modules.php?name=Forums&file=modcp&mode=ip&p=145046&t=12990
Why is Shortlinks giving an memory error for this link that is not tapped?
Edit:
When I disable Shortlinks in config.php the IP check works normally and there is no error message. |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1281
|
Posted:
Mon Sep 08, 2008 8:15 am |
|
Well, the original reason for tapping links was for SEO reasons, therefore, since anonymous can never see these moderator-only links, there was no need/reason to tap them.
It is not the link that is causing the memory error, but when clicking on it, the work being done to produce the output is still having the page output buffered until the very end where it then runs through all the $urlin array to search and replace with $urlout.
I'll have to look at that particular modcp function and see if I can tell what might be different about that one. |
_________________ “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:
Mon Sep 08, 2008 8:55 am |
|
Thanks! Can the problem be solved by tapping this link or does it not change anything? |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1281
|
Posted:
Mon Sep 08, 2008 9:00 am |
|
Doesn't change anything. When you click on a tapped link vs. a non-tapped link, the end result is exactly the same as that is what the .htaccess rewrite rules are all about...
You are saying that when you click that link above that is when the problem arises correct? I want to make sure I am looking at the right page/script. As of right now, when I click on that link, the resultant page is only a few Kbytes in size, so I am confused as to what is going on. There is something within the phpBB code that is hogging up memory with this function... |
_________________ “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:
Mon Sep 08, 2008 9:13 am |
|
Yes, but it only seems to happen for posts that guests have posted. My guess is that it must reflect that the guests have a lot of different ip-addresses compared to a regular member. My database is pretty big 147 MB. Guests are allowed to post in the forum. |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1281
|
Posted:
Mon Sep 08, 2008 1:09 pm |
|
Oh, that is a very good point. That is exactly what is happening! I am surprised that you even let guests post. I personally have never allowed that as it just invites forum spam. Probably why I have never seen this.
Now, the IP link doesn't show up if you are anonymous right? I mean, there would be no reason for a non-Admin type to see that link. That could make this easier to deal with.
What I am thinking is that the whole shortlinks buffering be bypassed if in a moderator/admin only type page. Problem is that NO links will be shortened in those specific cases, but since the SE crawlers will never see those links, this should never really be an issue right?
Thoughts? |
_________________ “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:
Mon Sep 08, 2008 1:18 pm |
|
Sounds as a good idea. Does it mean that entireShortlinks will not work on the entire site, if one is logged in as Forum Admin?
Only Forum Admins can see the IP-link.
I have no problem at all with spam on my site, as I use bbantispam. It protects even Shoutbox from spam. |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 374
|
Posted:
Tue Sep 09, 2008 5:14 am |
|
Good point on Admins/ Moderators not needing to invoke overhead for shortened links.
As link shortening is done in htaccess by removing those with admin type links (and adjusting the tap files accordingly) I think that would be do-able.
Slightly more problematical with Moderators though as I don't think they pass through the master admin file which means they might lose tapping site wide for the forums.
Never ceases to amaze me the great idea's that come from this site  |
| |
|
|
 |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Tue Sep 09, 2008 5:21 am |
|
I think php_value memory_limit 24M did not work, due to the fact that my web hotel has Safemode on. This make it impossible to increase memory through PHP.
BTW, I think it would be good to have changes for Admins and Moderators configurable and to have possibility to have it on or off. |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 374
|
Posted:
Tue Sep 09, 2008 6:31 am |
|
Just a quickie, are you using a version of phpNuke 7.9+ by any chance? I'm wondering that as there were some forum file relocating it might be looping. |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1281
|
Posted:
Tue Sep 09, 2008 7:24 am |
|
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! |
_________________ “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 8:33 am |
|
I am using 7.6 with patch 3.3 and not 7.9+ |
| |
|
|
 |
|
|