php_extension mbstring is recommended to be installed/enabled

php_extension mbstring is recommended to be installed/enabled

- Simon Scholey の投稿
返信数: 19

php_extension mbstring is recommended to be installed/enabled

Anybody able to tell me:

a) will this improve speed or functionality of my installation

b) how to do it if it will benefit my site!

Many thanks

Si

Simon Scholey への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Eloy Lafuente (stronk7) の投稿
画像 Core developers 画像 Documentation writers 画像 Moodle HQ 画像 Peer reviewers 画像 Plugin developers 画像 Testers
Hi Simon,

starting with Moodle 1.5 and widely used in next Moodle 1.6 a lot of strings functions are being processed by a new text library in order to be able to handle different charsets properly, specially the UTF-8 one.

This library tries to do its work by using the mbstring or iconv libraries and, if they aren't present, a fallback mechanism to use internal functions is used instead. As these internal functions are written in PHP code, they will be slower that their mbstring/iconv counterparts.

And this is the primary reason to recommend mbstring/iconv. They are solid libraries and pretty faster than the alternative internal (PHP) functions.

Ciao 笑顔
Eloy Lafuente (stronk7) への返信

Re: php_extension mbstring is recommended to be installed/enabled

- William Fraser の投稿
Any explain to me in simple terms how to install/enable this?
William Fraser への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Ken Wilson の投稿
Uncomment this line in your php.ini:

extension=php_mbstring.dll

Hope this helps!

Ken
Ken Wilson への返信

Re: php_extension mbstring is recommended to be installed/enabled

- William Fraser の投稿
By uncomment do you mean remove the ';' at the start of the line? If so it didn't work.
William Fraser への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Ken Wilson の投稿
William

Are you using Linux or Windows and do you have a hosted moodle or direct access? Also it would be helpful if you could attach your php.ini and your the output from phpinfo (in moodle 1.6 this is in Administration, Miscellaneous, Environment - there is a button at the bottom of the page).

Ken
Ken Wilson への返信

Re: php_extension mbstring is recommended to be installed/enabled

- William Fraser の投稿

Hi Ken

I am using Windows and it is direct access. Attached is the php.ini file. How would you like me to display the phpinfo file?

William Fraser への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Ken Wilson の投稿
Can you double check that you have the file php_mbstring.dll in the directory c:\php\ext and that it is the correct version (right click, properties, version, file version should be 5.1.4.x - if you're running php 5.1.4).

For the phpinfo, there is a more efficient method: at the command prompt, type php -i > phpinfo.txt. Attach the phpinfo.txt to your post.

Ken



Ken Wilson への返信

Re: php_extension mbstring is recommended to be installed/enabled

- William Fraser の投稿

php ver 5.1.2

php_mbstring.dll does exist and is version 5.1.2.2

phpinfo.txt attached.

William Fraser への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Ken Wilson の投稿
Looking at the phpinfo I can see mbstring has loaded:

mbstring

Multibyte Support => enabled
Multibyte string engine => libmbfl
Multibyte (japanese) regex support => enabled
Multibyte regex (oniguruma) version => 3.7.1

So all's well and your php is using the library in the background.

Ken
Ken Wilson への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Jose A. Ruiz の投稿
hi Ken

I have linux (RH enterprice 4) and need help installin or enable the MSBTRING. i need to recompilate de Php, instaling a RPM or editing the php.ini.

TKZ
Jose A. Ruiz への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Iñaki Arenaza の投稿
画像 Core developers 画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers
Red Has has mbstring extension packaged as a standard RPM as part of the system. Have a look in your installation CDs.

Saludos. Iñaki.
Iñaki Arenaza への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Jose A. Ruiz の投稿
gracias Iñaki... voy a buscar en los discos...
muy amable por responder tan rápido ;)
Jose A. Ruiz への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Ahmed Metwally の投稿

Please guys i have same question of Jose. I really need answer. I'd like to enable the mbstring under Linux. The following is the mbstring section in my php.ini. Should i change or uncomment anything to enable it.

[mbstring]
; language for internal character representation.
;mbstring.Xlanguage= Japanese

; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
;mbstring.internal_encoding = EUC-JP

; http input encoding.
;mbstring.http_input = auto

; http output encoding. mb_output_handler must be
; registered as output buffer to function
;mbstring.http_output = SJIS

; enable automatic encoding translation accoding to
; mbstring.internal_encoding setting. Input chars are
; converted to internal encoding by setting this to On.
; Note: Do _not_ use automatic encoding translation for
;       portable libs/applications.
;mbstring.encoding_translation = Off

; automatic encoding detection order.
; auto means
;mbstring.detect_order = auto

; substitute_character used when character cannot be converted
; one from another
;mbstring.substitute_character = none;

; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
;mbstring.func_overload = 0

Ahmed Metwally への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Ken Wilson の投稿

As Iñaki points out, most linux distributions have mbstring available as a package which you can add manually. Search the rpmfind.net database, download using wget and then install using rpm -ivh. Alternatively, if you have yum, type "yum install php-mbstring".

Ken Wilson への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Ahmed Metwally の投稿
Thank you so much for your reply. Unfortunately the yum did not work out. If I got and installed the rpm package, should I reconfigure the php?
Ahmed Metwally への返信

Re: php_extension mbstring is recommended to be installed/enabled

- kiran solanki の投稿
Hi I am trying to install mbstring on the following system: Windows 2003 Apache 2.2.6 PHP 5.2.5 moodle 1.8.3 It says that this is missing. When i try to install the extension from the msi installer i can not find the extension 'mbstring' I go to the php.ini and there is details on mbstring as stated as the follows: [mbstring] ; language for internal character representation. ;mbstring.Xlanguage= Japanese ; internal/script encoding. ; Some encoding cannot work as internal encoding. ; (e.g. SJIS, BIG5, ISO-2022-*) ;mbstring.internal_encoding = EUC-JP ; http input encoding. ;mbstring.http_input = auto ; http output encoding. mb_output_handler must be ; registered as output buffer to function ;mbstring.http_output = SJIS ; enable automatic encoding translation according to ; mbstring.internal_encoding setting. Input chars are ; converted to internal encoding by setting this to On. ; Note: Do _not_ use automatic encoding translation for ; portable libs/applications. ;mbstring.encoding_translation = Off ; automatic encoding detection order. ; auto means ;mbstring.detect_order = auto ; substitute_character used when character cannot be converted ; one from another ;mbstring.substitute_character = none; ; overload(replace) single byte functions by mbstring functions. ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), ; etc. Possible values are 0,1,2,4 or combination of them. ; For example, 7 for overload everything. ; 0: No overload ; 1: Overload mail() function ; 2: Overload str*() functions ; 4: Overload ereg*() functions ;mbstring.func_overload = 0 ; enable strict encoding detection. ;mbstring.strict_encoding = Off There is no 'extension=php_mbstring' Any ideas????
kiran solanki への返信

Re: php_extension mbstring is recommended to be installed/enabled

- Iñaki Arenaza の投稿
画像 Core developers 画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers