Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
AD Gallery 54
SyntaxHighlighte... 51
Newsletters v4.03 112
Facebook Like Box 125
Newsletters v4.02 57
Metro 164
Facebook Connect 171
Shoutbox Panel 127
Redactor for PHP... 106
MI Floating Side... 109
Facebook Login/R... 154
Avatar Studio v2.03 179
Relationship Sta... 98
Sexual Orientati... 116
Fisherman 143
Popular Addons
iTheme2 5801
Arise 5790
User Control v1.23 4619
Event Calendar 4050
Photowidget panel 3888
Radio-Theme red2... 3356
Highslide Gallery 3314
CSS/JavaScript D... 3231
Facebook Connect... 2985
Dynamic Menu 2893
Slideshow Lightb... 2721
L-AMANT 2659
Enigma 2636
2Dark 2606
Black 2579
View Thread
Who is here? 1 guest(s)
 Print Thread
Shoutbox_panel: Fatal error: Call to undefined function: mb_substr()
babi
Hello, I just upgraded from 7.00.07 to 7.01.05

Everything seems fine now (haven't fully tested the site yet), but I had to disable Shoutbox_Panel due to the follow error:

Fatal error: Call to undefined function: mb_substr() in /home/***/public_html/infusions/shoutbox_panel/shoutbox_panel.php on line 39

Apologize in advance if someone asked this question or this error is trivial as I have not been coding for a couple of years and don't have the proficiency and time to troubleshoot quick at this time.

Can someone explain to me what went wrong and what needs to be done to get this issue fixed so I can bring my shoutbox online again?

Your help is much appreciated!

Server OS: Linux
PHP Version: 4.4.9
Website: www.mshade.net
 
http://www.mshade.net/
NetriX
It looks like that function is not enabled. Check your phpinfo() file for mbstring and see if its enabled. If you don't see it, it's not enabled.

If you are admin of your server, a first idea might be to check for something like

extension=mbstring

in your php.ini file.

Still not working?

Remove the entire sbwrap function.

Download source  Code
function sbwrap($text) {
   global $locale;

   $i = 0; $tags = 0; $chars = 0; $res = "";

   $str_len = strlen($text);

   for ($i = 0; $i < $str_len; $i++) {
      $chr = mb_substr($text, $i, 1, $locale['charset']);
      if ($chr == "<") {
         if (mb_substr($text, ($i + 1), 6, $locale['charset']) == "a href" || mb_substr($text, ($i + 1), 3, $locale['charset']) == "img") {
            $chr = " ".$chr;
            $chars = 0;
         }
         $tags++;
      } elseif ($chr == "&") {
         if (mb_substr($text, ($i + 1), 5, $locale['charset']) == "quot;") {
            $chars = $chars - 5;
         } elseif (mb_substr($text, ($i + 1), 4, $locale['charset']) == "amp;" || mb_substr($text, ($i + 1), 4, $locale['charset']) == "#39;" || mb_substr($text, ($i + 1), 4, $locale['charset']) == "#92;") {
            $chars = $chars - 4;
         } elseif (mb_substr($text, ($i + 1), 3, $locale['charset']) == "lt;" || mb_substr($text, ($i + 1), 3, $locale['charset']) == "gt;") {
            $chars = $chars - 3;
         }
      } elseif ($chr == ">") {
         $tags--;
      } elseif ($chr == " ") {
         $chars = 0;
      } elseif (!$tags) {
         $chars++;
      }

      if (!$tags && $chars == 18) {
         $chr .= "<br />";
         $chars = 0;
      }
      $res .= $chr;
   }

   return $res;
}




and change

Download source  Code
sbwrap(parseubb(parsesmileys($data['shout_message']), "b|i|u|url|color"))




to

Download source  Code
parseubb(parsesmileys($data['shout_message']), "b|i|u|url|color")



Edited by NetriX on 02-04-2011 04:51
PHPFusionMods.com - Serving PHP-Fusion addons since 2007.

www.php-fusion.co.uk/infusions/addondb/img/approved_dev.png
 
http://www.phpfusionmods.com
babi
Thanks for the quick reply!

I have contacted my server administrator to see if something can be done to enable the function.

They are looking into that for me and I will wait for their response first before modifying the codes.

Thank you sooooo much!
 
http://www.mshade.net/
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
HighSlide Gallery Error Panels and Infusions 1 17-05-2013 21:58
Need help with SQL Syntax error after update Upgrading issues 8 17-05-2013 09:13
Error after editing profile Panels and Infusions 8 21-04-2013 19:21
Shoutbox Error Suspected Bugs and Errors 3 19-04-2013 12:22
Forum error Suspected Bugs and Errors 2 19-04-2013 12:22
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue