Page MenuHomePhabricator

Fatal installer error using Oracle DB (HTTP 500 error): undefined function mb_check_encoding()
Closed, ResolvedPublic

Description

Author: andrew

Description:
Attempting to install using Oracle as the backend. Fresh install of 1.19.2. PHP with OCI8 is working fine in other apps.

Going through the MW installer, after submitting a configuration on the "Connect to database" page (specifying the Database TNS, Database username, etc.), clicking Continue results in an HTTP 500.

In my web server's error log I see:

PHP Fatal error: Call to undefined function mb_check_encoding() in /var/www/wiki.example.org/includes/db/DatabaseOracle.php on line 307, referer: http://wiki.example.org/mw-config/index.php


Version: 1.19.2
Severity: critical
OS: Linux

Details

Reference
bz41146

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:57 AM
bzimport set Reference to bz41146.

freak wrote:

This backend uses mb_check_encoding to make sure everything used in queries is always in the right encoding. It might be removed at some point, but for now it requires php to have mbstring enabled (i.e.: --enable-mbstring)

Hope this helps in any way ...

languages/Language.php sets mb_internal_encoding('UTF-8'), so the check in DatabaseOracle.php checks for valid UTF-8.

AFAIK, throughout the rest of MediaWiki, mbstring is always optional.

To check for valid UTF-8, DatabaseOracle.php could use the same technique as Language::checkTitleEncoding(), which uses preg_match if mb_check_encoding is not available.