Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Forum Spam + Apache CPU Usage

Asked Modified Viewed 3,716 times
H
Haruspex
H
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

Ok so some people have been spamming my php-fusion forum with 'very' long forum posts. Whenever someone tries to load the thread after they do this the page just hangs on loading and my apache uses up 20-90% CPU depending on how many people try and access the thread! I have to delete the user that made the spam messages and restart apache. Its really annoying, once it nearly locked my entire server up.

Any help and advice appreciated!

Thanks
0 replies

2 posts

I
iunruh
I
iunruh 10
  • Member, joined since
  • Contributed 148 posts on the community forums.
  • Started 15 threads in the forums
answered
Member

If you're using the standard fusion forum, you can shorten the messages to less than, oh say, 1000 characters.

Open up /forum/postnewthread.php and find:

$message = trim(stripinput(censorwords($_POST['message'])));


Replace with:

$message = trimlink(trim(stripinput(censorwords($_POST['message']))), 1000);


Let me know how it works for you
0 replies
H
Haruspex
H
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Hi, thanks for your reply.

I think I found out why such spamming was crashing my apache. Long messages shouldn't crash apache but when they spam PHPFusion is not requiring them to move on to a new line, i.e. there is no max length per line so when they spam thousands of characters the length spans really wide. Thats my theory anyway, anyway to force them to go to a new line or something?

Thanks again
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet