View previous topic :: View next topic |
Author |
Message |
httpete Smarty Rookie
Joined: 05 Dec 2009 Posts: 27
|
Posted: Thu Feb 10, 2011 5:01 pm Post subject: <b>Fatal error</b>: Call to undefined function |
|
|
Gents,
<b>Fatal error</b>: Call to undefined function mb_split() in <b>/home/smith/Gt/trunk/src/web/external_lib/Smarty/plugins/shared.mb_str_replace.php</b> on line <b>30</b><br />
I stay right up to date off of svn trunk for our app, but I have to change this one call each time to @split instead of the mb_split. I don't get it since I am on the latest greatest php 5.3.5 right from Fedora distribution. Any suggestion?
Pete |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Thu Feb 10, 2011 6:44 pm Post subject: |
|
|
I'm not following… you say your up-to-date (PHP5.3.5) but managed to throw out MBString?
mb_split() is a function of the Multibyte String PECL. You really really want that.
But in any case this should be resolved with Smarty 3.1. We've reworked the entire system for proper UTF-8 compatibility.
split() has been deprecated with 5.3.0 btw. You'd want to not rely on that anymore… |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Feb 10, 2011 8:17 pm Post subject: |
|
|
Something I just read from another site:
Quote: | all RedHat based systems like Fedora and CentOS seem to have the mbstring extension build separately as an extra package called php-mbstring. And usually the problem you describe is solved by installing it. |
|
|
Back to top |
|
Barak Smarty n00b
Joined: 22 Mar 2011 Posts: 1
|
Posted: Tue Mar 22, 2011 11:22 pm Post subject: Call to undefined function mb_split() in |
|
|
solving this for me was uncommenting the ;extension=php_mbstring.dll in the php.ini file make sure you double check to see where the php.ini file is loaded from, this can be done with making a file with this command <?=phpinfo()?>, then at the beginning of the output of this file you can see the Loaded Configuration File path for the php.ini file, don't forget also to restart apache after changes have been made to the php.ini file |
|
Back to top |
|
jonyo Smarty Rookie
Joined: 14 Feb 2011 Posts: 16
|
Posted: Fri Dec 02, 2011 3:31 pm Post subject: |
|
|
rodneyrehm wrote: | ...
But in any case this should be resolved with Smarty 3.1. We've reworked the entire system for proper UTF-8 compatibility.
… |
Version 3.1 is now out, and we had someone report this same error, on Smarty 3.1.5, except it's found on a different line 47 now (same filename). Is Smarty 3.1 meant to work on servers without MB extension loaded?
I know 3.1.6 was just released, I checked the changelog and nothing about this issue was mentioned. Also downloaded 3.1.6 and that file didn't have changes in it. |
|
Back to top |
|
jonyo Smarty Rookie
Joined: 14 Feb 2011 Posts: 16
|
Posted: Mon Mar 05, 2012 8:13 pm Post subject: |
|
|
This still happens, I've found on servers that have MBString enabled, but have MB Regex disabled, this happens. If they don't have MB String at all, the stuff that detects MB string built into smarty kicks in and there is no problem. |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Mon Mar 05, 2012 8:21 pm Post subject: |
|
|
jonyo wrote: | This still happens, I've found on servers that have MBString enabled, but have MB Regex disabled, this happens. If they don't have MB String at all, the stuff that detects MB string built into smarty kicks in and there is no problem. |
How does one disable MB regex? I couldn't find any directive for that in the manual. The only way to throw out internal functions (I know of) is disable_functions. Please find out how mb_strlen() can be available but mb_split() not.
Anyways, to prevent Smarty from using MBString functions: Code: | define('SMARTY_MBSTRING', 'false');
define('SMARTY_SMARTY_RESOURCE_CHAR_SET', 'ISO-8859-1'); |
_________________ Twitter |
|
Back to top |
|
jonyo Smarty Rookie
Joined: 14 Feb 2011 Posts: 16
|
Posted: Wed Nov 07, 2012 7:27 pm Post subject: |
|
|
rodneyrehm wrote: | jonyo wrote: | This still happens, I've found on servers that have MBString enabled, but have MB Regex disabled, this happens. If they don't have MB String at all, the stuff that detects MB string built into smarty kicks in and there is no problem. |
How does one disable MB regex? I couldn't find any directive for that in the manual. The only way to throw out internal functions (I know of) is disable_functions. Please find out how mb_strlen() can be available but mb_split() not.
Anyways, to prevent Smarty from using MBString functions: Code: | define('SMARTY_MBSTRING', 'false');
define('SMARTY_SMARTY_RESOURCE_CHAR_SET', 'ISO-8859-1'); |
|
I missed your reply, didn't realize "notify me when a reply is posted" is off by default on the forums! (or at least it was at time I originally joined in)
Anyways, to answer your question, how to have mb regex disabled when normal mb string is working... I ran into another client's host have this issue, and looking at the PHP info, the PHP was compiled with the option "--disable-mbregex" which apparently is a thing... Might need to add a separate check specifically for whether mb regex is disabled, it's not very often but it does come up and it is a built-in option for the MB string stuff. |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Wed Nov 07, 2012 8:08 pm Post subject: |
|
|
Yeah, we've figured out that part and already fixed it in 3.1.12! _________________ Twitter |
|
Back to top |
|
|