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