LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 04-08-2005, 08:37 AM   #1
Magsol
LQ Newbie
 
Registered: Mar 2005
Location: Georgia
Distribution: Ubuntu / Leopard / WinXP
Posts: 23

Rep: Reputation: 15
MySQL and PHP: Multibyte Character Support


Hello everyone!

Only recently (I think), whenever I load up phpmyadmin to do some database maintenance, I find that, after logging in, there's some red text at the bottom of the screen that says this:

Quote:
The mbstring PHP extension was not found and you seem to be using multibyte charset. Without mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.
I am using phpmyadmin version 2.6.1-pl2, MySQL version 4.1.10-standard, and PHP version 5.0.3. The MySQL charset is UTF-8 Unicode.

I did a little bit of research on PHP's website into the multibyte char library, and it looks like this is something that comes standard on every installation of PHP - it only requires activation at time of compilation. However, I could not determine how to set up the multibyte character function library in a post-installation environment. Is there some setting in the php.ini file that can be changed to enable multibye char support? Will I need to reconfigure and recompile PHP to enable it?

And guidance and suggestions are much appreciated!
 
Old 04-08-2005, 01:44 PM   #2
Magsol
LQ Newbie
 
Registered: Mar 2005
Location: Georgia
Distribution: Ubuntu / Leopard / WinXP
Posts: 23

Original Poster
Rep: Reputation: 15
This is the section of the php.ini file that deals with the mbstring library:

Quote:
[mbstring]
; language for internal character representation.
;mbstring.language = 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
None of these seem intuitive, by which I mean "Enable mbstring support." Am I just missing what I'm looking for, or do I need to completely reinstall PHP to enable its support? Or is it something else entirely? :-P

Thanks!
 
Old 04-09-2005, 09:21 AM   #3
Magsol
LQ Newbie
 
Registered: Mar 2005
Location: Georgia
Distribution: Ubuntu / Leopard / WinXP
Posts: 23

Original Poster
Rep: Reputation: 15
No one knows?...
 
Old 04-19-2005, 08:36 PM   #4
cjs500
LQ Newbie
 
Registered: Apr 2005
Posts: 12

Rep: Reputation: 0
If you are running Linux you will need to recompile with the --enable-mbstring. I find its better to compile the binary package rather than using the RPM installer packages. If you use the RPM's, check you phpinfo option in phpMyAdmin to see if the configuration includes --enable-mbstring.

I ran my install using the following:

./configure --enable-mysql --with-apache2=/path_to_apache/bin/apxs --enable-mbstring
make
make install

After I recompiled the PHP build it worked fine.

If you are running it on a Windows OS you may need to get the DLL's from the binary package for windows and include them in the windows\system32 folder or root or you php directory. This being a guess. I am a windows guy but I don't run it on a Windows OS. Not as good.

Good Luck!
 
Old 04-26-2005, 10:24 PM   #5
greenhornet
Member
 
Registered: Mar 2002
Location: Sydney, Australia
Distribution: RHEL, Fedora, Yellow Dog
Posts: 43

Rep: Reputation: 15
I'm using Red Hat Enterprise Linux 4 and the php rpm does not have mbstring support by default.

However there is an RPM package "php-mbstring" that will provide it.

From the RPM file
"The php-mbstring package contains a dynamic shared object that will add
support for multi-byte string handling to PHP"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql query for multibyte string onnyloh Programming 3 12-03-2004 08:29 PM
Installing MySQL.4.0.17 and php support for Mysql on RedHat 9.0 Neha Linux - Software 13 12-29-2003 12:06 AM
C Multibyte character encoding ugenn Programming 0 12-14-2003 07:44 AM
character sets in Linux, MySql, PHP, Apache prague_expat Linux - General 1 09-21-2003 05:33 PM
Invalid or incomplete multibyte or wide character chanys Linux - General 1 03-13-2003 10:09 PM


All times are GMT -5. The time now is 09:03 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration