It looks like as long as the messages aren't too long and they don't contain any special functions (making emoticons) the database and the script will run properly but if really lengthy one-word messages are sent or images are used the database likes to die at or around message 15-17.
My ideas: None but I find it hopeful since it usually crashes around the same time. Do you have any suggestions (besides MySQL)? (by breaking apart I mean the contents from the DB are not printed out in insertion order. Insertion order is retained unless there are substitutions it looks like).
if (param) { if ($name) { if ($message) { open( LOG, "$file" ); # open count log for ID $cnt = <LOG>; close(LOG); $cnt++; open( LOG, "> $file" ); print LOG $cnt; close(LOG); $name =~ s/</<\;/g; # removing exploit $message =~ s/</<\;/g; # removing exploit $name =~ s/$_/****/g for @words; # say goodbye to swear words $message =~ s/$_/****/g for @words; # say goodbye to swear words $message =~ s/:\)/\<img src=\"$imagedir\/smiley.gif\"\>/g; # happy emo +ticon $message =~ s/:\(/\<img src=\"$imagedir\/sad.gif\"\>/g; # sad emoti +con $message =~ s/:p/\<img src=\"$imagedir\/tongue.gif\"\>/g; # tongue em +oticon $message =~ s/:P/\<img src=\"$imagedir\/tongue.gif\"\>/g; # tongue1 e +moticon $message =~ s/:o/\<img src=\"$imagedir\/oh.gif\"\>/g; # oh emotic +on $message =~ s/:O/\<img src=\"$imagedir\/oh.gif\"\>/g; # oh1 emoti +con $message =~ s/\*hug\*/\<img src=\"$imagedir\/hug.gif\"\>/g; # hug emo +ticon $message =~ s/\*flower\*/\<img src=\"$imagedir\/flower.gif\"\>/g; # f +lower emoticon $message =~ s/\*wink\*/\<img src=\"$imagedir\/wink.gif\"\>/g; # wink +emoticon $message =~ s/\*devil\*/\<img src=\"$imagedir\/devil.gif\"\>/g;# devil + emoticon $message =~ s/\*love\*/\<img src=\"$imagedir\/love.gif\"\>/g; # love +emoticon $message =~ s/\*sleep\*/\<img src=\"$imagedir\/sleep.gif\"\>/g;# sleep + emoticon $message =~ s/\*conf\*/\<img src=\"$imagedir\/confused.gif\"\>/g;# sle +ep emoticon my $keeptime = join (':', $hour, $min, $sec); my $info = join ( '::', $name, $message, $keeptime ); $chat{$cnt} = $info; } else { print "Message was missing, data not sent.<br>"; } } else { print "Name was missing, data not sent.<br>"; } } foreach (reverse keys (%chatorder)) { my ( $name, $message, $time ) = split /::/, $chatorder{$_}; $message = wrap('', '', $message); print Tr(td({-width=>'700'},"<font color=blue><$name @ $time> +;</font>$message")), }
20030627 Edit by Corion: Fixed runaway italics
In reply to SDBM acting weird by sulfericacid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |