1

I've been running a Drupal 7 site on Centos 6.7 and php 5.3, and have finally gotten around to updating php to 5.6.20. The update went well; the only problem I'm hitting is that I'm getting log messages about mbstring.http_input (and mbstring.http_output) being deprecated:

PHP Deprecated: Unknown: Use of mbstring.http_output is deprecated in ...

I've seen no shortage of articles (e.g., MAMP: php.ini - mbstring.http_input - Disabling for Drupal) talking about how the solution is to get:

php_value mbstring.http_input pass
php_value mbstring.http_output pass

into my apache configuration or into the Drupal settings.php file with ini_set(). But I seem to have done that: the apache config file for the site contains:

<IfModule mod_php5.c>
  php_flag magic_quotes_gpc                 off
  php_flag magic_quotes_sybase              off
  php_flag register_globals                 off
  php_flag session.auto_start               off
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_flag mbstring.encoding_translation    off
</IfModule>

and phpinfo.php reports, in the mbstring section, that mbstring.http_input and mbstring.http_output have local values of "pass", as (I guess) they're supposed to. Meanwhile, I've found one Drupal patch that is meant to keep Drupal from complaining, but I'm still getting the PHP messages in the system log.

I must be doing something wrong; can anyone tell what it is? Thanks!


UPDATE 4/1/2016:

I found that just a simple call to phpinfo() would trigger the log messages, but only when the call came from inside the site -- I have another, non-Drupal site with a phpinfo page/call in it, and calling it did NOT produce the log messages. I then tried removing the mbstring references from the Drupal site's apache config, to look like this:

<IfModule mod_php5.c>
  php_flag magic_quotes_gpc                 off
  php_flag magic_quotes_sybase              off
  php_flag register_globals                 off
  php_flag session.auto_start               off
</IfModule>

...and the log messages are gone. I also hacked drupal_convert_to_utf8() to make sure mb_convert_encoding() won't be called.

So, yay? Have I done something that will bite me in the future, or is this a valid adjustment to the site? Or something in between?

Community
  • 1
  • 1
Jim Miller
  • 3,291
  • 4
  • 39
  • 57

0 Answers0