I have a server with
mbstring.internal_encoding = UTF-8
mbstring.func_overload = 7
Try it! I can't tell what's wrong, but the application is completly broken. Yeah, that's useful information. OK that's what the log says:
PHP Warning: mb_strtolower() [<a href='function.mb-strtolower'>function.mb-strtolower</a>]: Unknown encoding "(null)" in /var/www/malkusch.de/ssl/webmail/functions/imap_mailbox.php on line 111
Your log will probably say something else, because I started to fix the calls...but it's too much. It works when strtolower() has a second parameter:
Exactly it seems to be a PHP-Bug because, as of my runtime setting, the second parameter should implictly be 'UTF-8'. An imediate ini_get('mbstring.internal_encoding') before strolower() proofs my setting.
I can't reproduce the problem in a small test case. Somewhere you're doing something which triggers an unknown bug in PHP which let's PHP forget the implicit second parameter for strtolower (and strtoupper).
You know your code better and could probably have an idea what could be responsable for this strange behavious.
As func_overload is not configurable through .htaccess (even though the manual says that) I can't disable func_overloading.