在Mac

2011-01-24 34 views
3
安裝phpMyAdmin時

PhpMyAdmin install errors在Mac

有安裝phpMyAdmin的一些問題缺少MBSTRING PHP擴展。我想解決以下問題,但不知道從哪裏開始(除了php.ini?)。

以下是錯誤消息。

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. 

這裏還有一個相關的文章中,我發現,這樣是爲Linux,但在我的Mac(OSX 10.6 PHP更新等),沒有工作:PhpMyAdmin install errors

回答

11

像錯誤消息指出,您的PHP安裝缺少mbstring擴展名。我的Snow Leopard中蘋果提供的PHP 5.3.3似乎擁有它,但許多發行版將這些擴展單獨捆綁在一起。舉例來說,如果你使用PHP從MacPorts的,你需要與安裝PHP5-MBSTRING -package:

sudo port install php5-mbstring 
+1

這個答案真的很好,因爲我已經設置了MacPorts的一切。謝謝! – user575228 2011-01-25 23:51:55

5

小記 - 如果你已經安裝了不同版本的PHP(如php5.5),你必須安裝正確版本的mbstring包。在我的情況:

sudo port install php55-mbstring 

要激活,你必須有這樣一行在php.ini文件:

extension=mbstring.so 

它來源於:

/opt/local/var/db/php55/mbstring.ini 

(如果您使用默認的macports安裝根目錄)。

0

在最新的php版本中,「extension_dir」路徑未啓用初始。

它適用於Windows和Linux,所以也許這也有助於在MacOS ... :)

screenshot