Zabbix and PhpMyAdmin on the same web server

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>

That’s it!

2 pensieri su “Zabbix and PhpMyAdmin on the same web server

  1. Thanks for sharing your findings, it helped me to sort this problem. Too bad PHP decided that mbstring.func_overload is a system variable now, not per-directory, breaking many hosted sites. By the way one of your post tags has a typo (fuunc…)

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Solve : *
28 − 25 =


Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.