cancel
Showing results for 
Search instead for 
Did you mean: 

mb_string disabled?

ffupi
Grafter
Posts: 370
Registered: ‎01-08-2007

mb_string disabled?

Is mb_string (mbstring) function disabled at PlusNet?
In my cms a charset-translation is calling on that php-function but gets the response:
Fatal error: Call to undefined function: mb_convert_encoding() in /path/to/file/of/ffupi/mydirectory/mycms/subdirectory/more/more/thisisthephpfile.php on line 134
If it is disabled, can it be switched on by including into the php-file:
--enable-mbstring
... and how is that done?
In the php-help at http://de3.php.net/manual/en/ref.mbstring.php it explains that this function is not enabled by default.
Huh
Something like that:
<?php
// Enable mb_string for this php-file
mbstring enable;
....bla..bla..php-code
?>
Huh
6 REPLIES 6
Prod_Man
Grafter
Posts: 287
Registered: ‎04-08-2007

Re: mb_string disabled?

You can check if "mb_string" is disabled with PHPInfo();
Scroll down, if it is enabled it would display a large bold title "mb_string",
and possibly a table for configuration.
also, don't you mean:

if(dl('php_mbstring.so")){
}else{
//error
}

unless 'dl' is also disabled Tongue
to do what you're asking, you would probably have to do something like:
system('php --enable-mbstring file.php",$return);
to enable PHP to properly pickup CL stuff,
no way can a currently running PHP manipulate the CL its parsed from the Web Server.
it's a pain in the proverbial because it's not always a practical solution with dynamic systems to have all sorts of messy bodges.
Hopefully something there helps... perhaps I have missed the point of what you're after...
Jim,
ffupi
Grafter
Posts: 370
Registered: ‎01-08-2007

Re: mb_string disabled?

Hello
Thank you for the reply.
I have now amended the phpinfo.php file as follows:
<?
system('php --enable-mbstring file.php",$return);
phpinfo()
?>

However, this does not work. The error message is:
Parse error: parse error, unexpected $ in /path/to/file/bla/ffupi/phpinfo.php on line 4
I then tried this:
<?
ini_set("mbstring", "enable");
phpinfo()
?>

It also does not work. The ini_set is just ignored.
The same with that:
<?
ini_set("mbstring.encoding_translation", "On");
phpinfo()
?>

Any idea what the correct ini_set syntax is?
Huh
ffupi
Grafter
Posts: 370
Registered: ‎01-08-2007

Re: mb_string disabled?

Any hope of an answer?
Peter_Vaughan
Grafter
Posts: 14,469
Registered: ‎30-07-2007

Re: mb_string disabled?

The option is a compile time selection, not a run-time selection. Also it needs an additional shared object library to be installed on the server containing the necessary functions which, if it were, would have been included in the compile/config of php anyway.
ffupi
Grafter
Posts: 370
Registered: ‎01-08-2007

Re: mb_string disabled?

Hello
I have now put an Apache server on my memory stick and it runs the cms quite well. The php module mbstring is included.

Is there a problem to enable this module on a big server like PlusNet? I ask this because I received this answer from customer support:
Quote
I have put forward your request to add this module. We will look into adding this if there are enough customers requesting it. Please let us know if you have any further queries.

On the memory stick I noted many more module enabled, than on PlusNet.
How shall I understand this?
prichardson
Grafter
Posts: 1,503
Thanks: 1
Registered: ‎05-04-2007

Re: mb_string disabled?

This module was never enabled on our systems at compile time. The reason why, I do not know.
Because of  the nature of the service, it is not simple to simply compile this module in.
It has to be done as a carefully thought out project, to ensure that this module is not going to break backwards compatibility, ensure that the module is stable and not going to create problems with the service and other factors.
How long this would take or if it would happen, is unknown as it would depend on the number of requests and other items on the workstack.