Page MenuHomePhabricator

Issue with Math extension: Getting "API error: internal_api_error_DBQueryError" while previewing the edit"
Open, Stalled, Needs TriagePublic

Description

I am getting the error "API error: internal_api_error_DBQueryError" while clicking the previewing option after entering a text with <math> ... </math>.

Mediawiki version 1.33.
URL: https://www.embeddedsoft.net/wiki/Special:Version

Event Timeline

Aklapper changed the task status from Open to Stalled.Sep 23 2019, 8:03 PM

Hi @Jithin1234, thanks for taking the time to report this and welcome to Wikimedia Phabricator!

Please provide a more detailed error message by following https://www.mediawiki.org/wiki/Manual:How_to_debug

I have added the lines mentioned in the https://www.mediawiki.org/wiki/Manual:How_to_debug page in my index.php and LocalSettings.php.
But I am not getting a detailed error report.

I got the below warnings after I submitted a post edit with <math></math> tag example,

Warning: putenv() has been disabled for security reasons in /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/Setup.php on line 134

Warning: set_time_limit() has been disabled for security reasons in /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/GlobalFunctions.php on line 2901

This comment was removed by Jithin1234.

Well, I'm also only going to search for the word "error" in that log file. :)

[exception] [XYudBQUbv5zhfji9g6gGNAAAADQ] /index.php?title=Popular_python_libraries_for_machine_learning&action=submit   Wikimedia\Rdbms\DBQueryError from line 1587 of /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: SELECT  math_inputhash,math_mathml,math_tex,math_svg,math_input  FROM `EMBDSFT_mathoid`    WHERE math_inputhash = '-\ABԢ\C9%N\EB\F8\D1SHbۆQ'  LIMIT 1  
Function: MathRenderer::readFromDatabase
Error: 1146 Table 'b11_19237449_embedsoft.EMBDSFT_mathoid' doesn't exist (sql303.byethost.com)

Did you run update.php after installing the Math extension?

[error] [XYudBQUbv5zhfji9g6gGNAAAADQ] /index.php?title=Popular_python_libraries_for_machine_learning&action=submit   ErrorException from line 2901 of /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/GlobalFunctions.php: PHP Warning: set_time_limit() has been disabled for security reasons
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/GlobalFunctions.php(2901): set_time_limit(integer)
#2 /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/actions/Action.php(423): wfTransactionalTimeLimit()
#3 /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/actions/EditAction.php(44): Action->useTransactionalTimeLimit()
#4 /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/actions/SubmitAction.php(38): EditAction->show()
#5 /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/MediaWiki.php(499): SubmitAction->show()
#6 /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#7 /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/MediaWiki.php(865): MediaWiki->performRequest()
#8 /home/vol11_5/byethost11.com/b11_19237449/htdocs/includes/MediaWiki.php(515): MediaWiki->main()
#9 /home/vol11_5/byethost11.com/b11_19237449/htdocs/index.php(47): MediaWiki->run()
#10 {main}

You'll have to contact your hosting provider who put this restriction into place.
If you'd like to experiment you could also comment every line in which this function is used in MediaWiki core. :)

I have run the webupdater, as my hosting does not support commandline access to execute update.php.
It seems the webupdater is not working as expected.

PHP Warning: set_time_limit() has been disabled for security reasons

set_time_limit() is required (since T102890), so you have to talk to your hosting provider so they fix their PHP restrictions.

Note that the time limit warning is only a warning, and is likely not the cause of the problem this task describes. The warning can be hidden from your logs by raising the "error reporting" threshold for PHP.