Topic on Project:Support desk

Syntax errors after installation when accessing the mainpage. Database: Oracle

4
Summary by Ciencia Al Poder
Arjun r (talkcontribs)

I've been trying to find answers to this bug but I'm simply not getting anywhere. I'm using an oracle backend and it installs correctly. But the minute I access index.php it gives me the following error (This is after enabling sqlerrors in my LocalSettings.php file)

A database query error has occurred. This may indicate a bug in the software.

Query:
INSERT INTO /*Q*/L10N_CACHE (lc_lang,lc_key,lc_value) VALUES (:lc_lang, :lc_key, )
Function: DatabaseOracle::insertOneRow
Error: 936 ORA-00936: missing expression

I ran the update.php in the maintenance folder and it updated fine.

These are the results which I get when I run eval.php and the following commands:

var_dump( $wgContLang );
var_dump( Language::factory( 'da' ) );

object(Language)#7 (14) {
  ["mConverter"]=>
  object(FakeConverter)#8 (1) {
    ["mLang"]=>
    *RECURSION*
  }
  ["mVariants"]=>
  NULL
  ["mCode"]=>
  string(2) "en"
  ["mLoaded"]=>
  bool(false)
  ["mMagicExtensions"]=>
  array(0) {
  }
  ["mMagicHookDone"]=>
  bool(false)
  ["mHtmlCode":"Language":private]=>
  NULL
  ["mParentLanguage":"Language":private]=>
  bool(false)
  ["dateFormatStrings"]=>
  array(0) {
  }
  ["mExtendedSpecialPageAliases"]=>
  NULL
  ["namespaceNames":protected]=>
  NULL
  ["mNamespaceIds":protected]=>
  NULL
  ["namespaceAliases":protected]=>
  NULL
  ["transformData"]=>
  array(0) {
  }
}

PHP Warning:  strpos() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1308
PHP Warning:  strpos() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1304
PHP Warning:  substr() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1304
Caught exception DBQueryError: A database error has occurred. Did you forget to run maintenance/update.php after upgrading?  See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: INSERT INTO /*Q*/L10N_CACHE (lc_lang,lc_key,lc_value) VALUES (:lc_lang, :lc_key, )
Function: DatabaseOracle::insertOneRow
Error: 936 ORA-00936: missing expression

#0 /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php(709): DatabaseOracle->reportQueryError('ORA-00936: miss...', 936, 'INSERT INTO /*Q...', 'DatabaseOracle:...')
#1 /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php(576): DatabaseOracle->insertOneRow('l10n_cache', Array, 'LCStoreDB::set')
#2 /var/www/html/devinsample/mediawiki-1.23.1/includes/cache/LocalisationCache.php(1229): DatabaseOracle->insert('l10n_cache', Array, 'LCStoreDB::set')
#3 /var/www/html/devinsample/mediawiki-1.23.1/includes/cache/LocalisationCache.php(963): LCStoreDB->set('messages:nov', 'nov')
#4 /var/www/html/devinsample/mediawiki-1.23.1/includes/cache/LocalisationCache.php(452): LocalisationCache->recache('da')
#5 /var/www/html/devinsample/mediawiki-1.23.1/includes/cache/LocalisationCache.php(326): LocalisationCache->initLanguage('da')
#6 /var/www/html/devinsample/mediawiki-1.23.1/includes/cache/LocalisationCache.php(260): LocalisationCache->loadItem('da', 'fallback')
#7 /var/www/html/devinsample/mediawiki-1.23.1/languages/Language.php(4146): LocalisationCache->getItem('da', 'fallback')
#8 /var/www/html/devinsample/mediawiki-1.23.1/languages/Language.php(237): Language::getFallbacksFor('da')
#9 /var/www/html/devinsample/mediawiki-1.23.1/languages/Language.php(196): Language::newFromCode('da')
#10 /var/www/html/devinsample/mediawiki-1.23.1/maintenance/eval.php(81) : eval()'d code(1): Language::factory('da')
#11 /var/www/html/devinsample/mediawiki-1.23.1/maintenance/eval.php(81): eval()
#12 {main}

And finally these are my error logs

[Tue Jul 29 22:55:08 2014] [error] [client 10.168.54.77] PHP Warning:  strpos() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1308
[Tue Jul 29 22:55:08 2014] [error] [client 10.168.54.77] PHP Warning:  strpos() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1304
[Tue Jul 29 22:55:08 2014] [error] [client 10.168.54.77] PHP Warning:  substr() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1304
[Tue Jul 29 22:55:08 2014] [error] [client 10.168.54.77] PHP Warning:  strpos() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1308
[Tue Jul 29 22:55:08 2014] [error] [client 10.168.54.77] PHP Warning:  strpos() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1304
[Tue Jul 29 22:55:08 2014] [error] [client 10.168.54.77] PHP Warning:  substr() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1304
[Tue Jul 29 22:55:08 2014] [error] [client 10.168.54.77] PHP Warning:  strpos() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1308
[Tue Jul 29 22:55:08 2014] [error] [client 10.168.54.77] PHP Warning:  strpos() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1304
[Tue Jul 29 22:55:08 2014] [error] [client 10.168.54.77] PHP Warning:  substr() expects parameter 1 to be string, object given in /var/www/html/devinsample/mediawiki-1.23.1/includes/db/DatabaseOracle.php on line 1304

Could anyone please help me with starting MediaWiki using this very same Oracle backend as I can't use mySQL? Or are these just bugs in the software which might take time to fix? There was a post pretty similar to mine but even though its tagged resolved but it isn't... http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Fatal_Error_after_installation/reply_(5)

Ciencia Al Poder (talkcontribs)

While MediaWiki claims it supports variousdatabase engines, the true story here is that it's only tested on mysql, and most changes subbmited to code don't test those database engines.

I suspect that's a bug, and you should report it.

In the meantime, you may try an older MediaWiki version like 1.22 to see if those errors aren't present.

Ciencia Al Poder (talkcontribs)

I've just gone ahead and reported on bugzilla myself. It's on bug 68874. Please create an account there if you don't have one and add yourself as CC of that bug in case someone requests more information.

Ciencia Al Poder (talkcontribs)

Apparently, Oracle is not supported on recent versions of MediaWiki, albeit appearing as being one of the options, so I recommend you to use another Database engine for MediaWiki :(

Reply to "Syntax errors after installation when accessing the mainpage. Database: Oracle"