collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 434
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: shoutbox lets crash webserver/php  (Read 19151 times)

0 Members and 1 Guest are viewing this topic.

Offline azunai

  • Semi Newbie
  • *
  • Posts: 13
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
shoutbox lets crash webserver/php
« on: December 19, 2009, 03:24:19 PM »
hey, ok the last 3 days were like hell -.-
problem occured: forums index page was just blank
apache went to 100%cpu + 900mb ram usage
load ~ 30

after google was my best friend for 1 day i resigned on apache and installed nginx
and since today i tried everything to get my forum back online
my forums database was spammed with errors 2.000.000 entrys  but all sensless (login failed and so on)
produced in 2 or 3 hours

and now, i found the problems source, i installed a fresh smf v1.1.11 and installed the simple portal 2.3.1 package, guess what happend -.- blank index, 100%cpu everything f***ed up

i dont get why, cause im using simple portal for month now

do you have any ideas? or hints to get it back to work?

greetings

www.gamerevision.com

edit: haha got deeper, seems to be the shoutbox
edit2: hm a new shoutbox works, strange
edit3!!!!!!!!
found the bug!!!!!!!

just paste "bla-email@web.de" into a sp 2.3.1 sb and everything crashes

edit4: paste any email adress into the sb and it crashs :(
checkin why atm

Edit-> Removed obscene language
« Last Edit: August 04, 2014, 03:42:19 PM by Underdog »

Offline azunai

  • Semi Newbie
  • *
  • Posts: 13
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: shoutbox lets crash webserver/php
« Reply #1 on: December 20, 2009, 01:02:48 PM »
fixed!

simpyl added

Code: [Select]
$shout = str_replace("@","(at)",$shout);in line 1354 in Subs-Portal.php Source dir


Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: shoutbox lets crash webserver/php
« Reply #2 on: January 01, 2010, 10:03:04 PM »
There are currently unresolved issues with the parse_bcc function being used within the shoutbox, stopping email addresses from being parsed removes many of the performance issues.

Here is the fix being used at SimplePortal.net (from Sinan):
Sources/Subs.php

Code: (Find) [Select]
$disabled, $parse_tag_cache;
Code: (Replace) [Select]
$disabled, $default_disabled, $parse_tag_cache;
Code: (Find) [Select]
if ($parse_tags !== array() && is_array($parse_tags))
{
$temp_bbc = $bbc_codes;
$tags_cache_id = implode(',', $parse_tags);

if (isset($parse_tag_cache[$tags_cache_id]))
$bbc_codes = $parse_tag_cache[$tags_cache_id];
else
{
foreach ($bbc_codes as $key_bbc => $bbc)
foreach ($bbc as $key_code => $code)
if (!in_array($code['tag'], $parse_tags))
unset($bbc_codes[$key_bbc][$key_code]);

$parse_tag_cache = array($tags_cache_id => $bbc_codes);
}
}

Code: (Replace) [Select]
if ($parse_tags !== array() && is_array($parse_tags))
{
$temp_bbc = $bbc_codes;
$tags_cache_id = implode(',', $parse_tags);

if (!isset($default_disabled))
$default_disabled = isset($disabled) ? $disabled : array();

if (isset($parse_tag_cache[$tags_cache_id]))
list ($bbc_codes, $disabled) = $parse_tag_cache[$tags_cache_id];
else
{
foreach ($bbc_codes as $key_bbc => $bbc)
foreach ($bbc as $key_code => $code)
if (!in_array($code['tag'], $parse_tags))
{
$disabled[$code['tag']] = true;
unset($bbc_codes[$key_bbc][$key_code]);
}

$parse_tag_cache = array($tags_cache_id => array($bbc_codes, $disabled));
}
}
elseif (isset($default_disabled))
$disabled = $default_disabled;
« Last Edit: March 17, 2010, 02:47:37 PM by [SiNaN] »
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #3 on: February 10, 2010, 06:16:01 AM »
There are currently unresolved issues with the parse_bcc function being used within the shoutbox, stopping email addresses from being parsed removes many of the performance issues.

Here is the fix being used at SimplePortal.net (from Sinan):
Sources/Subs.php

Code: (Find) [Select]
$disabled, $parse_tag_cache;
Code: (Replace) [Select]
$disabled, $default_disabled, $parse_tag_cache;
Code: (Find) [Select]
if ($parse_tags !== array() && is_array($parse_tags))
{
$temp_bbc = $bbc_codes;
$tags_cache_id = implode(',', $parse_tags);

if (isset($parse_tag_cache[$tags_cache_id]))
$bbc_codes = $parse_tag_cache[$tags_cache_id];
else
{
foreach ($bbc_codes as $key_bbc => $bbc)
foreach ($bbc as $key_code => $code)
if (!in_array($code['tag'], $parse_tags))
unset($bbc_codes[$key_bbc][$key_code]);

$parse_tag_cache = array($tags_cache_id => $bbc_codes);
}
}

Code: (Replace) [Select]
if ($parse_tags !== array() && is_array($parse_tags))
{
$temp_bbc = $bbc_codes;
$tags_cache_id = implode(',', $parse_tags);

if (!isset($default_disabled))
$default_disabled = $disabled;

if (isset($parse_tag_cache[$tags_cache_id]))
list ($bbc_codes, $disabled) = $parse_tag_cache[$tags_cache_id];
else
{
foreach ($bbc_codes as $key_bbc => $bbc)
foreach ($bbc as $key_code => $code)
if (!in_array($code['tag'], $parse_tags))
{
$disabled[$code['tag']] = true;
unset($bbc_codes[$key_bbc][$key_code]);
}

$parse_tag_cache = array($tags_cache_id => array($bbc_codes, $disabled));
}
}
elseif (isset($default_disabled))
$disabled = $default_disabled;

so what does this do? does it fix the problem? and is it now safe to use the shoutbox with this edit?

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: shoutbox lets crash webserver/php
« Reply #4 on: February 10, 2010, 06:22:42 AM »
Please do not double post.

That edit stops the error from occuring, by stopping SMF from parsing email addresses within the shoutbox. Normally it would turn them into an email link.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #5 on: February 10, 2010, 06:25:23 AM »
Please do not double post.

That edit stops the error from occuring, by stopping SMF from parsing email addresses within the shoutbox. Normally it would turn them into an email link.

i didn't double post... anyways this is a 100% fix 'will never happen again' thing?

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: shoutbox lets crash webserver/php
« Reply #6 on: February 10, 2010, 06:33:20 AM »
Please do not double post.

That edit stops the error from occuring, by stopping SMF from parsing email addresses within the shoutbox. Normally it would turn them into an email link.

i didn't double post... anyways this is a 100% fix 'will never happen again' thing?

You posted the same question in two separate topics. Anyway, yes, this edit should fix the problem. There is never a !00% chance that it will never happen again, but this same solution has worked for other people, so there is no reason why it should not work for you.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #7 on: February 10, 2010, 06:38:03 AM »
thank you

also why is this not included with SP?

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: shoutbox lets crash webserver/php
« Reply #8 on: February 10, 2010, 06:52:40 AM »
Because there hasn't been a SP bugfix release since this bug was first discovered.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #9 on: February 10, 2010, 07:03:32 AM »
Because there hasn't been a SP bugfix release since this bug was first discovered.

seems like it needs to be fixed to me :\

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #10 on: February 10, 2010, 02:20:07 PM »
tht code/fix has some problems: all images are showing all weird (out of line) and quotes aren't working... how do i fix this?
« Last Edit: February 10, 2010, 02:40:28 PM by steve51184 »

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #11 on: February 10, 2010, 05:40:37 PM »
any ideas about my last post?

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #12 on: February 10, 2010, 06:57:51 PM »
fixed!

simpyl added

Code: [Select]
$shout = str_replace("@","(at)",$shout);in line 1354 in Subs-Portal.php Source dir

where exactly do i add this? (ie. before/after what?)

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #13 on: February 15, 2010, 09:10:26 PM »
tht code/fix has some problems: all images are showing all weird (out of line) and quotes aren't working... how do i fix this?

hate to quad post but i did wait almost a week..

anyway that fix messes up all my images and stops quotes from showing so i had to take it off so can you fix that please as if anyone posts an email address my server will crash lol

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #14 on: February 21, 2010, 08:58:32 AM »
6th bump please reply :(

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: shoutbox lets crash webserver/php
« Reply #15 on: February 23, 2010, 03:32:35 PM »
The fix in the post below should work:
http://simpleportal.net/index.php?topic=4126.msg26219#msg26219

Check that you have applied it correctly.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #16 on: February 23, 2010, 04:22:08 PM »
The fix in the post below should work:
http://simpleportal.net/index.php?topic=4126.msg26219#msg26219

Check that you have applied it correctly.

i did but it didn't work :(

Offline steve51184

  • Jr. Member
  • **
  • Posts: 68
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: shoutbox lets crash webserver/php
« Reply #17 on: February 23, 2010, 05:02:30 PM »

Offline ibrrorg

  • Semi Newbie
  • *
  • Posts: 11
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: shoutbox lets crash webserver/php
« Reply #18 on: February 28, 2010, 07:50:57 AM »
Didn't know whether to post here or start afresh, so opted to post here as the issue was identical.

So, this is the post that started it all for me.  Portal is stable again, but I cannot implement the shoutbox even following the fix SiNaN suggests here doesn't seem to fix it.

I want to get a little deeper, though.  SMF 2.0 RC2, SP 2.3.1, Curve/Default theme, my site is here.  So, simply loading the shoutbox crashes/locks down my system.  Goes back to the original reasons why I had to pull it.  Is this a SMF or SP issue and is there hope for a fix any time soon?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: shoutbox lets crash webserver/php
« Reply #19 on: February 28, 2010, 10:50:27 AM »
ibrrorg, that fix would have fixed the issue. Can you provide me an admin account and FTP access via pm? I could check it for you.
And slowly, you come to realize... It's all as it should be...