Last modified: 2014-09-03 20:19:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65178, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63178 - Fatal Error after installation with Oracle backend: Call to checkTitleEncoding() on a non-object
Fatal Error after installation with Oracle backend: Call to checkTitleEncodin...
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.22.4
PC Windows 7
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: oracle
  Show dependency treegraph
 
Reported: 2014-03-27 07:14 UTC by Jens Røbel
Modified: 2014-09-03 20:19 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
phpinfo (64.04 KB, text/html)
2014-03-27 07:14 UTC, Jens Røbel
Details

Description Jens Røbel 2014-03-27 07:14:35 UTC
Created attachment 14937 [details]
phpinfo

I am not able to setup MediaWiki with the below environment specifications:

Windows NT MISC-PC01 6.1 build 7601 (Windows 7 Business Edition Service Pack 1)

Apache/2.2.25 (Win32) PHP/5.4.26 mod_fcgid/2.3.6

Oracle Run-time Client Library Version: 11.2.0.4.0 

Log status:

Install

##Including extensions... done
##Setting up database... done
##Creating database user... done
##Creating tables... done
##Populating default interwiki table... done
##Initializing statistics... done
##Generating secret keys... done
##Creating administrator user account... done
##Creating main page with default content...
Warning: strpos() expects parameter 1 to be string, object given in C:\Apache2.2\htdocs\wiki\includes\db\DatabaseOracle.php on line 1146

Warning: strpos() expects parameter 1 to be string, object given in C:\Apache2.2\htdocs\wiki\includes\db\DatabaseOracle.php on line 1142

Warning: substr() expects parameter 1 to be string, object given in C:\Apache2.2\htdocs\wiki\includes\db\DatabaseOracle.php on line 1142
 done
##Creating tables for enabled extensions...

When trying to enter the page this error message shows up:

Fatal error: Call to a member function checkTitleEncoding() on a non-object in C:\Apache2.2\htdocs\wiki\includes\db\DatabaseOracle.php on line 1158
Comment 1 Jens Røbel 2014-03-27 07:58:59 UTC
Oracle Version

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
"CORE	11.2.0.3.0	Production"
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
Comment 2 Andre Klapper 2014-03-27 11:12:12 UTC
Thanks for taking the time to report this!
Comment 3 Gustavo De Nardin (spuk) 2014-09-03 20:19:49 UTC
Backtrace obtained adding a call to debug_print_backtrace() just before the checkTitleEncoding() call (on version 1.21.11, but the problem seems the same):

php maintenance/eval.php
#0  DatabaseOracle->wrapFieldForWhere(l10n_cache, lc_lang, pt-br) called at [/var/www/html/sdwiki_1.21.11/includes/db/DatabaseOracle.php:1135]
#1  DatabaseOracle->wrapConditionsForWhere(l10n_cache, Array ([lc_lang] => pt-br,[lc_key] => deps)) called at [/var/www/html/sdwiki_1.21.11/includes/db/DatabaseOracle.php:1145]
#2  DatabaseOracle->selectRow(l10n_cache, Array ([0] => lc_value), Array ([lc_lang] => pt-br,[lc_key] => deps), LCStore_DB::get) called at [/var/www/html/sdwiki_1.21.11/includes/cache/LocalisationCache.php:1013]
#3  LCStore_DB->get(pt-br, deps) called at [/var/www/html/sdwiki_1.21.11/includes/cache/LocalisationCache.php:381]
#4  LocalisationCache->isExpired(pt-br) called at [/var/www/html/sdwiki_1.21.11/includes/cache/LocalisationCache.php:424]
#5  LocalisationCache->initLanguage(pt-br) called at [/var/www/html/sdwiki_1.21.11/includes/cache/LocalisationCache.php:310]
#6  LocalisationCache->loadItem(pt-br, fallback) called at [/var/www/html/sdwiki_1.21.11/includes/cache/LocalisationCache.php:245]
#7  LocalisationCache->getItem(pt-br, fallback) called at [/var/www/html/sdwiki_1.21.11/languages/Language.php:3978]
#8  Language::getFallbacksFor(pt-br) called at [/var/www/html/sdwiki_1.21.11/languages/Language.php:230]
#9  Language::newFromCode(pt-br) called at [/var/www/html/sdwiki_1.21.11/languages/Language.php:189]
#10 Language::factory(pt-br) called at [/var/www/html/sdwiki_1.21.11/includes/Setup.php:497]
#11 require_once(/var/www/html/sdwiki_1.21.11/includes/Setup.php) called at [/var/www/html/sdwiki_1.21.11/maintenance/doMaintenance.php:103]
#12 require(/var/www/html/sdwiki_1.21.11/maintenance/doMaintenance.php) called at [/var/www/html/sdwiki_1.21.11/maintenance/commandLine.inc:58]
#13 require_once(/var/www/html/sdwiki_1.21.11/maintenance/commandLine.inc) called at [/var/www/html/sdwiki_1.21.11/maintenance/eval.php:37]
NULL
PHP Fatal error:  Call to a member function checkTitleEncoding() on a non-object in /var/www/html/sdwiki_1.21.11/includes/db/DatabaseOracle.php on line 1122

What happens is DatabaseOracle.php needs the $wgContLang object, but creation of the $wgContLang object tries to access the LocalisationCache, which, by default, resides on the database, unless $wgCacheDirectory is set.

So, it seems setting $wgCacheDirectory to a directory, thus making the cache reside on disk files on that directory, works around this issue. I tried and it seem to have worked (again, on version 1.21.11).

Other database drivers don't seem to need $wgContLang, dunno why the Oracle one does.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links