問題タブ [php-gettext]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - Ubuntu 20.04 PhpMyAdmin error 500 with php7.0 - caching_sha2_password]
Ubuntu 20.04 で php バージョン 7.0 を使用していて、http://localhost/phpmyadmin/ を開こうとすると、HTTP エラー 500 が表示されます。
データベースに接続する他のページを開こうとすると、次のように表示されます。
- 「メッセージ: mysqli::real_connect(): サーバーがクライアントに認識されていない認証方法を要求しました [caching_sha2_password]」
- "mysqli::real_connect(): (HY000/2054): サーバーがクライアントに認識されていない認証方法を要求しました"
PHP のバージョンを 7.4 に変更すると、すべて正常に動作します (phpmyadnim とページ)
バージョン 7.0 のログ (tail /var/log/apache2/error.log) を確認したところ、次のエラーがあります。
- 「PHP 解析エラー: 構文エラー、予期しない 'const' (T_CONST)、58 行目の /usr/share/php/PhpMyAdmin/MoTranslator/Translator.php の変数 (T_VARIABLE) が必要です」
インストールを試みました:
sudo apt-get install php-mbstring php7.0-mbstring php-gettext
しかし、これを行うたびに、「パッケージphp-gettextが見つかりません」という情報が表示されます
PHP バージョン 7.4 では、すべて問題ありません。しかし、私はphpバージョン7.0を使いたいです。
私は試した:
- phpmyadminを削除して再度インストールします
- PHPバージョン7.0を削除して再度インストールします