无法禁用 Drupal 8 安装的多字节字符串输入转换



我安装了很多Drupal站点,以前从未遇到过这个问题。在尝试安装8.1.2时,我收到一个错误,上面写着:

PHP中的多字节字符串输入转换处于活动状态,必须残废检查php.ini mbstring.http_input设置。请参阅有关详细信息,请参阅PHP mbstring文档。

Drupal附带的.htaccess文件已经有一个部分应该禁用它:

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
php_value assert.active                   0
php_flag session.auto_start               off
php_value mbstring.http_input             pass
php_value mbstring.http_output            pass
php_flag mbstring.encoding_translation    off
# PHP 5.6 has deprecated $HTTP_RAW_POST_DATA and produces warnings if this is
# not set.
php_value always_populate_raw_post_data   -1
</IfModule>

我已经测试过了,使用了这个.htaccess文件。服务器正在运行一个带有cPanel/WHM的CentOS 7新安装程序。我还将PHP设置(使用WHM)更改为:

; http input encoding.
mbstring.http_input = pass
; http output encoding. mb_output_handler must be
; registered as output buffer to function
mbstring.http_output = pass

尽管我认为这与违约情况没有明显不同。我检查过这是实际使用的php.ini文件。我已经重新启动了Apache。

解决方案是启用mbstring扩展。

最新更新