PHP7.0 phpMyAdmin 的 gettext/streams.php#48 錯誤修復

·

進入 phpMyAdmin 管理頁面,會出現 Deprecation Notice 錯誤的通知,雖然不影響 phpMyAdmin 功能,但這個警告一直佔用畫面,造成使用上很不方便。

為什麼會出現錯誤警告,真的不知道;這幾天維護代管客戶的 VPS 主機時發現的,進入資料庫時,就看到這個訊息:

Deprecation Notice in ./../../../../../usr/share/php/php-gettext/streams.php#48
Methods with the same name as their class will not be constructors in a future version of PHP; StringReader has a deprecated constructor

Backtrace

./../../../../../usr/share/php/php-gettext/gettext.inc#41: require()
./libraries/select_lang.lib.php#477: require_once(./../../../../../usr/share/php/php-gettext/gettext.inc)
./libraries/common.inc.php#569: require(./libraries/select_lang.lib.php)
./index.php#12: require_once(./libraries/common.inc.php)

每使用一個動作時,就會跑出上面一大掛的訊息,略過後,又會跑出來。

PHP gettext warnings

搜尋網路上一些修正方法,卸載掉 phpMyAdmin 後重新安裝,問題還是存在。

最後是使用升級 phpMyAdmin 的方法解決了這個問題:

sudo add-apt-repository ppa:nijel/phpmyadmin

重新啟動一次 PHP7.0

service php7.0-fpm restart

另一個方法,修改 php.ini 文件:

file path: /etc/php/7.0/fpm/php.ini

修改 error_reporting

error_reporting = ~E_DEPRECATED & E_ALL.

重新啟動一次 PHP7.0

service php7.0-fpm restart

參考資料:

PHP gettext warnings related to PHP 7

https://github.com/phpmyadmin/phpmyadmin/issues/11462

hosted by kinsta

Comments

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

Hey, 想嘗試 Kinsta 主機嗎?

18748

Kinsta 高效能主機

wPowered Starter 方案

馬上訂購

18749
Your Mastodon Instance