プロが教えるわが家の防犯対策術!

さくらインターネットで独自にPHP5を導入しました。

マルチバイトの処理"mb_convert_encoding"を実行したところ、文字化けしたままの状態です。

■phpinfo()で確認したところ、下記の通りとなっています。
-------------------------------------------------------------
Multibyte Support enabled
Multibyte string engine libmbfl
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) version 4.4.4
Multibyte regex (oniguruma) backtrack check On

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

DirectiveLocal ValueMaster Value
mbstring.detect_orderautoauto
mbstring.encoding_translationOffOff
mbstring.func_overload00
mbstring.http_inputautoauto
mbstring.http_outputSJISSJIS
mbstring.internal_encodingEUC-JPEUC-JP
mbstring.languageJapaneseJapanese
mbstring.strict_detectionOffOff
mbstring.substitute_characterno valueno value

--------------------------------------------------------------


■php.iniの内容は下記の通りです。
--------------------------------------------------------------
output_handler = mb_output_handler
mbstring.language = Japanese
mbstring.internal_encoding = EUC-JP
mbstring.http_input = auto
mbstring.http_output = SJIS
mbstring.encoding_translastion = On
mbstring.detect_order = auto
mbstring.substitute_character = none;
--------------------------------------------------------------


■PHP5をインストールするときの、conf.sh の内容は下記の通りです。
--------------------------------------------------------------
#!/bin/sh

./configure \
--prefix=$HOME \
--with-config-file-path=$HOME/www/cgi-bin \
--program-suffix=5 \
--with-pear=$HOME/share/pear5 \
--enable-force-cgi-redirect \
--enable-mbstring=all \
--enable-mbregex \
--enable-mbstr-enc-trans \
--enable-versioning \
--enable-trans-sid \
--with-mysql \
--with-openssl=/usr \
--with-soap=yes \
--with-zlib=/usr \
--with-gd=/usr/local \
--with-jpeg-dir=/usr \
--with-freetype-dir=/usr \
--with-ttf \
--with-png-dir=/usr \
--with-curl
--------------------------------------------------------------

■疑問点
php.ini で設定した、
   mbstring.encoding_translastion = On
が反映されていないことがphpinfo()を見ることでわかりました。

phpinfo()で表示される、Configuration File (php.ini) Path は
設定したphp.ini を指しているので、異なるphp.iniを参照しているわけではないと考えています。

ちなみに、php.ini で、上記のマルチバイト関連のオプション設定をしないときのphpinfo()の内容は下記の通りです。

Multibyte Support enabled
Multibyte string engine libmbfl
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) version 4.4.4
Multibyte regex (oniguruma) backtrack check On

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

DirectiveLocal ValueMaster Value
mbstring.detect_orderno valueno value
mbstring.encoding_translationOffOff
mbstring.func_overload00
mbstring.http_inputpasspass
mbstring.http_outputpasspass
mbstring.internal_encodingISO-8859-1no value
mbstring.languageneutralneutral
mbstring.strict_detectionOffOff
mbstring.substitute_characterno valueno value
 


なぜ、mbstring.encoding_translastion が反映されないのか、どこかで上書き設定されてしまうのか、他に設定すべきオプションがあるのか、教えていただけないでしょうか。

A 回答 (1件)

> php.ini で設定した、


>    mbstring.encoding_translastion = On

正確にこの内容ですか?だとすると、綴りが正しくありません。
translastion ではなく、translation です。

この回答への補足

ありがとうございます。
おっしゃるとおりでした。

どこかのインストール記事に書いてあったのをそのままコピペして見直さずにいました。

いやお恥ずかしい限りです。
こんなミスすることもあるんだな~って反省することしきりです。

補足日時:2007/03/20 00:13
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!