On a recent install, I had together on the same web server the Zabbix monitoring tool and PhpMyAdmin. It turns out that the first needs mbstring.func_overload set, while it annoys the second! Well, not a big deal, we have multiple configuration overrides for PHP values, don’t we?
Obviously yes, but there’s a common mistake about this particular (and others).
This PHP setting, as stated on config directives list, is a system setting, so it cannot be overridden in .htaccess or via ini_set() (see php_admin_value paragraph here).
But we still have one option: apache2 config file!
And, other than this, being a system setting it has to be changed using php_admin_value instead of php_value.
Zabbix has four settings needed in php.ini. I decided to have two of them global, and two overridden locally.
So I created /etc/php5/conf.d/zabbix.ini with the following content:
date.timezone = Europe/Rome post_max_size = 16M;
and in the system-created /etc/apache2/conf.d/zabbix, after the Alias line, add:
<DirectoryMatch "/usr/share/zabbix"> php_value max_execution_time 300 php_admin_value mbstring.func_overload 2 </DirectoryMatch>