MyBB Community Forums

Full Version: problems: class_parser.php on line 402
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
my problems, i look a page, after show

Quote:Fatal error: Maximum execution time of 30 seconds exceeded in /home/xxxxxxx/public_html/inc/class_parser.php on line 402

class_parser.php on line 402

Quote:if(version_compare(PHP_VERSION, "5.1.0", ">="))
{
$message = preg_replace('#([^<])(?<!"|&amp|&quot|&lt|&gt|&\#[0-9]{1}|&\#[0-9]{2}|&\#[0-9]{3}|&\#[0-9]{4})'.preg_quote($find, "#")."#is", "$1".$replace, $message, $remaining, $replacements);
$remaining -= $replacements;
if($remaining <= 0) break; // Reached the limit
}
else
{ (<--- line 402 - HappyPeoples notes)
$message = preg_replace('#([^<])(?<!"|amp|&quot|&lt|&gt|&\#[0-9]{1}|&\#[0-9]{2}|&\#[0-9]{3}|&\#[0-9]{4})'.preg_quote($find, "#")."#is", "$1".$replace, $message, $remaining);
}
}
}

// If we matched any tags previously, swap them back in
if(count($bad_matches[0]) > 0)
{
foreach($bad_matches[0] as $match)
{
$message = preg_replace("#<mybb-bad-sm>#", $match, $message, 1);

help me pls.
The error has nothing to do with the line number.

The most likely problem is that you have a large amount of smilies installed on your board, and it's causing the parser to take a long time to process all of them.
Zinga's correct. You need to remove some smilies. MyBB 1.4 has a hard limit for this situation
thanx ZiNga BuRgA and Tikitiki...
i send with ftp my server to class_parser.php 1.2.9...
not problems now..
Tikitiki Wrote:MyBB 1.4 has a hard limit for this situation

that could be a real problem, not?
dvb Wrote:
Tikitiki Wrote:MyBB 1.4 has a hard limit for this situation

that could be a real problem, not?

It's not a limitation on the smilies, it's a limitation on how many smilies you can have on each post. The current limit is at 500. I highly doubt anybody would ever have 500 smilies in a post unless it is pure spam
Tikitiki Wrote:MyBB 1.4 has a hard limit for this situation
...
It's not a limitation on the smilies, it's a limitation on how many smilies you can have on each post. The current limit is at 500. I highly doubt anybody would ever have 500 smilies in a post unless it is pure spam

500 smilies per post it's more than OK.. Toungue