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: 126

PostPosted: Sun Sep 07, 2008 8:10 am Reply with quote

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
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Sep 07, 2008 8:23 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 126

PostPosted: Sun Sep 07, 2008 3:15 pm Reply with quote

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
 
View user's profile Send private message
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 126

PostPosted: Sun Sep 07, 2008 4:13 pm Reply with quote

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.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Mon Sep 08, 2008 8:15 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 126

PostPosted: Mon Sep 08, 2008 8:55 am Reply with quote

Thanks! Can the problem be solved by tapping this link or does it not change anything?
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Mon Sep 08, 2008 9:00 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 126

PostPosted: Mon Sep 08, 2008 9:13 am Reply with quote

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.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Mon Sep 08, 2008 1:09 pm Reply with quote

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 
View user's profile Send private message Visit poster's website
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 126

PostPosted: Mon Sep 08, 2008 1:18 pm Reply with quote

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.
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 397

PostPosted: Tue Sep 09, 2008 5:14 am Reply with quote

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 Smile
 
View user's profile Send private message
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 126

PostPosted: Tue Sep 09, 2008 5:21 am Reply with quote

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.
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 397

PostPosted: Tue Sep 09, 2008 6:31 am Reply with quote

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.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Tue Sep 09, 2008 7:24 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 126

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

I am using 7.6 with patch 3.3 and not 7.9+
 
View user's profile Send private message
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