Skip to main content
Inspiring
December 1, 2006
Question

some special char showed incorrectly: missing mbstring PHP extension?

  • December 1, 2006
  • 2 replies
  • 629 views
hi:

i have a problem with some chars showing fine in my local server but
being substituted by a question mark when viewing from the remote one

initially i had my database (created pasting texts in phpMyAdmin) with
the Latin-1 charset and changed it later to UTF-8:

mysql> alter database `mydb` DEFAULT CHARACTER SET utf8 COLLATE
utf8_general_ci;
mysql> show create database mydb;
+----------+-------------------------------------------------------------------+
| Database | Create Database

+----------+-------------------------------------------------------------------+
| mydb | CREATE DATABASE `mydb` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+----------+-------------------------------------------------------------------+

chars giving problems:

left double quotation mark U+201C “
right double quotation mark U+201D ”
em dash U+2014 —

something keeping me confused is that the Mac Character Palette shows
different codes for the, apparently, same char:

Latin-1 supplement: Unicode 0093, UTF-8 C2 93
General puntuaction: Unicode 201C, UTF-8 E2 80 9C

the only thing i can guess as the source of the problem is that in the
remote server, phpMyAdmin is showing a warning:

"The mbstring PHP extension was not found and you seem to be using a
multibyte charset. Without the mbstring extension phpMyAdmin is unable
to split strings correctly and it may result in unexpected results."

is it neccessary to reinstall PHP to add the mbstring extension?

local
-----
OSX 10.4.8
PHP 5.1.6
MySQL 4.1.21-standard
phpMyAdmin 2.9.0.2

remote
-----
Linux 2.6.9-34.ELsmp (RHEL4 - PROFESSIONAL)
PHP 4.3.9
MySQL 4.1.12
phpMyAdmin 2.9.0.2

tia,

jdoe
This topic has been closed for replies.

2 replies

Inspiring
December 3, 2006
David Powers wrote:
> John Doe wrote:
>> is it neccessary to reinstall PHP to add the mbstring extension?
>
> On Linux, yes. It needs to be compiled into PHP. However, I'm surprised
> that it wasn't already compiled into PHP if you're using Red Hat
> Enterprise 4.

thanks for your help. i'm going to cantact the tech support because i
realized other useful extensions are missing like GD


Participant
December 12, 2006
Curious, as I'm getting the same issue as well with phpMyAdmin. I get the exact message that the mbstring extension was not found. I've posted details below -- any suggestions? I don't need the mbstring.so file do I, since it is compiled in?

I have the standard 4.3.9 RHEL4 install package, which has it built in according to the configure command used to make it:

'--enable-mbstring=shared'

The php.ini file has this:

;JM Addition
; Set default language
mbstring.language = Neutral; Set default language to Neutral(UTF-8) (default)
;mbstring.language = English; Set default language to English
;mbstring.language = Japanese; Set default language to Japanese

;; Set default internal encoding
;; Note: Make sure to use character encoding works with PHP
mbstring.internal_encoding = UTF-8 ; Set internal encoding to UTF-8

;; HTTP input encoding translation is enabled.
mbstring.encoding_translation = On

;; Set default HTTP input character encoding
;; Note: Script cannot change http_input setting.
;mbstring.http_input = pass ; No conversion.
;mbstring.http_input = auto ; Set HTTP input to auto
; "auto" is expanded to "ASCII,JIS,UTF-8,EUC-JP,SJIS"
;mbstring.http_input = SJIS ; Set HTTP2 input to SJIS
mbstring.http_input = UTF-8,SJIS,EUC-JP ; Specify order

;; Set default HTTP output character encoding
;mbstring.http_output = pass ; No conversion
mbstring.http_output = UTF-8 ; Set HTTP output encoding to UTF-8

;; Set default character encoding detection order
;mbstring.detect_order = auto ; Set detect order to auto
mbstring.detect_order = ASCII,JIS,UTF-8,SJIS,EUC-JP ; Specify order

;; Set default substitute character
mbstring.substitute_character = 12307 ; Specify Unicode value
mbstring.substitute_character = none ; Do not print character
mbstring.substitute_character = long ; Long Example: U+3000,JIS+7E7E
Inspiring
December 1, 2006
John Doe wrote:
> is it neccessary to reinstall PHP to add the mbstring extension?

On Linux, yes. It needs to be compiled into PHP. However, I'm surprised
that it wasn't already compiled into PHP if you're using Red Hat
Enterprise 4.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/