Author Topic: Call to undefined function mb_substr()  (Read 16392 times)

kallelat

  • Guest
Call to undefined function mb_substr()
« on: February 20, 2009, 07:10:59 am »
Hi,

following fatal error occured when clicking either a milestone or a task ( to edit ).

Fatal error: Call to undefined function mb_substr() in /var/www/html/opengoo/environment/classes/localization/Localization.class.php on line 241

and line 241 is:
$names['M'][$i] = mb_substr($names['F'][$i], 0, 3, 'UTF-8');

By changing mb_substr() to substr() the problem vanished, but this is of course only a temporary solution.


thanks, TK

mailnet_uk

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Re: Call to undefined function mb_substr()
« Reply #1 on: February 20, 2009, 09:08:15 am »
I got this also, you need to recompile your PHP installation, adding the --enable-mbstring flag (if you're running Unix.)  If you're running Windows I think you just need to uncomment the php_mbstring.dll line in your INI file.

I think the mb_* functions are for localisation.

fr0x

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Call to undefined function mb_substr()
« Reply #2 on: February 23, 2009, 07:45:11 pm »
Yea, this was the same problem that was breaking our install:
http://forums.opengoo.org/index.php?topic=956.0

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Call to undefined function mb_substr()
« Reply #3 on: February 23, 2009, 08:33:55 pm »
This function is needed to be able to substring texts with multibyte encodings. If you are using english language you can safely use the substr function, but with other languages that contain non-ascii characters it may cause other kind of errors.

I've changed that line of code and some others that I found to use a function called substr_utf that is defined somewhere else in OpenGoo. This function will invoke mb_substr if available and will use substr otherwise. The best solution still is to add support for mb_substr.

Baveskara

  • Hero Member
  • *****
  • Posts: 648
    • ICQ Messenger - 365673748
    • Yahoo Instant Messenger - cialis and beer
    • View Profile
    • generic cialis 5 mg from india
    • Email
cialis accion
« Reply #4 on: July 27, 2022, 09:33:01 pm »
The study of antiestrogen activity also demonstrated that compounds 9a, 9c f acted as full functional antagonists for ER?± viagra drug class
« Last Edit: December 09, 2022, 06:31:21 pm by Baveskara »

Baveskara

  • Hero Member
  • *****
  • Posts: 648
    • ICQ Messenger - 365673748
    • Yahoo Instant Messenger - cialis and beer
    • View Profile
    • generic cialis 5 mg from india
    • Email
Re: Call to undefined function mb_substr()
« Reply #5 on: July 28, 2022, 08:03:19 pm »
7zx Cialis Best Sellers Catalog buy cialis online prescription

Baveskara

  • Hero Member
  • *****
  • Posts: 648
    • ICQ Messenger - 365673748
    • Yahoo Instant Messenger - cialis and beer
    • View Profile
    • generic cialis 5 mg from india
    • Email
liquid cialis bodybuilding
« Reply #6 on: January 20, 2023, 10:43:30 pm »
buy cialis online 20mg The current report represents the largest phase III trial and most definitive test of BCT conducted within the United States Cooperative Group network