Last modified: 2013-09-07 14:43:43 UTC
Trying to create or run a math page results in a 500 page error. looking in apache log you see PHP Catchable fatal error: Object of class Blob could not be converted to string in /var/www/rnd-wiki/extensions/Math/MathRenderer.php on line 162. Database is Postgresql Server is Ubuntu 64bit
I'll have a look at this problem, which version of Postgresql do you use?
9.1.9 i'd be happy to do a join.me or something like that to let you look into it Installed software Product Version MediaWiki 1.21.1 PHP 5.4.9-4ubuntu2.1 (apache2handler) PostgreSQL 9.1.9 BlueSpice for MediaWiki 1.21.0
(In reply to comment #1) > I'll have a look at this problem, which version of Postgresql do you use? 9.1.9 i'd be happy to do a join.me or something like that to let you look into it Installed software Product Version MediaWiki 1.21.1 PHP 5.4.9-4ubuntu2.1 (apache2handler) PostgreSQL 9.1.9 BlueSpice for MediaWiki 1.21.0
Hi, a quick fix is to uncomment this line, since it only prints out debug output. I'll try to get a postgresql instance to submit a proper fix. Best Physikerwelt
its not commented for me wfDebugLog( "Math", 'store entry for $' . $this->tex . '$ in database (hash:' . $this->getInputHash() . ')\n' );
now im getting Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): s_k
sorry I mean comment it out, i.e. // wfDebugLog( "Math", 'store entry for $' . $this->tex . '$ in database (hash:' . $this->getInputHash() . ')\n' ); a real fix could be to replace the line by wfDebugLog( "Math", 'store entry for $' . $this->tex . '$ in database (hash:' . var_export( $this->getInputHash() , false ) . ')\n' );
(In reply to comment #6) > now im getting > > > Failed to parse (PNG conversion failed; check for correct installation of > latex > and dvipng (or dvips + gs + convert)): s_k Ok this is quite normal if you have not installed latex and dvipng. You can try out MathML rendering which does not require Latex to be installed by setting $wgUseLaTeXML = true; // enabeling MathJax as rendering option $wgDefaultUserOptions['math'] = MW_MATH_LATEXML; // setting LaTeXML as default rendering option (optional) in the LocalSettings.php file. See http://www.mediawiki.org/wiki/Extension:Math for more information.
tried that and its still coming up with the same error someone said in the render.ml they had to define the absolute path of latex and dvipng. do you know these?
I probably can not fix the original bug. In the latest version the debug output is wfDebugLog( "Math", 'store entry for $' . $this->tex . '$ in database (hash:' . $this->hash . ')\n' ); this should not cause problems since it is a text field. So the general solution would be to update to the latest version.
i am at the latest stable version
I know it's a little bit hard to fix errors, since the page is cached and the cache stores the errors as well. So if you change something in the config, you have to add ?action=purge to the url in order to trigger another run of the math extension code.
Yes. I know. Maybe there should be a new release since that version is 4 month old.
(In reply to comment #8) > (In reply to comment #6) > > now im getting > > > > > > Failed to parse (PNG conversion failed; check for correct installation of > > latex > > and dvipng (or dvips + gs + convert)): s_k > > Ok this is quite normal if you have not installed latex and dvipng. > You can try out MathML rendering which does not require Latex to be installed > by setting > > $wgUseLaTeXML = true; // enabeling MathJax as rendering option > $wgDefaultUserOptions['math'] = MW_MATH_LATEXML; // setting LaTeXML as > default > rendering option (optional) > > in the LocalSettings.php file. > See > http://www.mediawiki.org/wiki/Extension:Math > for more information. does that work for you?
nope this is what i have require_once("$IP/extensions/Math/Math.php"); $wgTmpDirectory = "$wgScriptPath/images/tmp"; $wgTexvc = '/var/www/rnd-wiki/extensions/Math/math/texvc'; $wgUseLaTeXML = true; // enabeling MathJax as rendering option $wgDefaultUserOptions['math'] = MW_MATH_LATEXML;
in my apache error log you see Use of undefined constant MW_MATH_LATEXML - assumed 'MW_MATH_LATEXML'
oh sorry my fault. This only works with the current master branch if you use git try cd extensions git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Math.git git checkout master in that case this config should be sufficient require_once("$IP/extensions/Math/Math.php"); //$wgTmpDirectory = "$wgScriptPath/images/tmp"; //$wgTexvc = '/var/www/rnd-wiki/extensions/Math/math/texvc'; $wgUseLaTeXML = true; // enabeling MathJax as rendering option $wgDefaultUserOptions['math'] = MW_MATH_LATEXML;
Failed to parse (LaTeXML MathML is invalid XML.): C_{f_q}
ok. yet another problem. This is because the a dependency to a newer version of the core. You can update your core version to the master version as well by git checkout master in the mediawiki root dir, or uncomment the xml check in MathLaTeXML.php line 204 /** * Checks if the input is valid MathML, * and if the root element has the name math * @param string $XML * @return boolean */ static public function isValidMathML( $XML ) { just add return true; there.
See Gerrit change #60987 for the blob fix
Since the change has been merged, can we close this bug as resolved?
I think so.