Last modified: 2014-10-19 22:31:47 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 T71693, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69693 - PNG is not created
PNG is not created
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Math (Other open bugs)
master
PC Linux
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 69702
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-18 12:59 UTC by christof.spies
Modified: 2014-10-19 22:31 UTC (History)
2 users (show)

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


Attachments

Description christof.spies 2014-08-18 12:59:03 UTC
MW Version: 1.23.1
Math Version: git master 084718af14d8597092337759b1b3ad95ec5be53f (current)
Server: Debian wheezy

What i did:
<pre>
cd wiki_path/extensions/
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Math.git

cd wiki_path/extensions/Math/texvcheck
make

cd wiki_path/extensions/Math/math
make

vim wiki_path/LocalSettings.php
# Math
# http://www.mediawiki.org/wiki/Extension:Math
require_once "$IP/extensions/Math/Math.php";
$wgMathDisableTexFilter = true;
// ensure MW_MATH_MATHML; is added to the $wgMathValidModes array;
$wgMathValidModes[] = MW_MATH_MATHML;

// Set Mathoid as default rendering option;
$wgDefaultUserOptions['math'] = MW_MATH_MATHML;
$wgMathValidModes[] = MW_MATH_LATEXML; // adding LaTeXML as rendering option

// Set LaTeXML as default rendering option;
$wgDefaultUserOptions['math'] = MW_MATH_LATEXML;

$wgDebugLogFile = "/tmp/wiki.log";
//EOF

php wiki_path/maintenance/update.php --quick
</pre>

What i got:
* formula is working with MathML
* formula is working with SVG fallback
* formula is not working with PNG fallback

The fallback link for PNG is pointing to "index.php?title=Spezial:MathShowImage&hash=903286ede01eb3c73938de7eb75fb295&mode=0".
This page is showing the error message "Fehler beim Parsen (PNG-Konvertierung fehlgeschlagen. Bitte die korrekte Installation von LaTeX und dvipng überprüfen (oder dvips + gs + convert)): \int\limits_a^x f(\frac{\alpha}{2}\,)\,dxx".
The log file contains:
<pre>
Start request GET /index.php?title=Spezial:MathShowImage&hash=903286ede01eb3c73938de7eb75fb295&mode=                   0
HTTP HEADERS:
HOST: example.com
USER-AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
ACCEPT-LANGUAGE: de,en-US;q=0.7,en;q=0.3
ACCEPT-ENCODING: gzip, deflate
COOKIE: xyz_wikiUserName=username; xyz_wikiUserID=1; xyz_wikiToken=801a8770d53e5b929e427efb13abbf0c; xyz_wiki_session=kdgr2o6r4eqaen24cnt7o1g3i2; s5slide=4%3A3
CONNECTION: keep-alive
CACHE-CONTROL: max-age=0
[caches] main: APCBagOStuff, message: APCBagOStuff, parser: APCBagOStuff
[caches] LocalisationCache: using store LCStoreDB
Connected to database 0 at localhost
Fully initialised
User: got user 1 from cache
User: loading options for user 1 from override cache.
User: logged in from session
[Math] start rendering $\int\limits_a^x f(\frac{\alpha}{2}\,)\,dxx$ in mode 0
[Math] TeX: /var/www/xyz-wiki/htdocs/mediawiki-1.23.2/extensions/Math/math/texvc '/tmp' '/tmp' '\int\limits_a^x f(\frac{\alpha}{2}\,)\,dxx' 'UTF-8' 'transparent'
[texvc] Executing '/var/www/xyz-wiki/htdocs/mediawiki-1.23.2/extensions/Math/math/texvc '/tmp' '/tmp' '\int\limits_a^x f(\frac{\alpha}{2}\,)\,dxx' 'UTF-8' 'transparent''.
wfShellExec: /bin/bash '/var/www/xyz-wiki/htdocs/mediawiki-1.23.2/includes/limit.sh' '/var/www/xyz-wiki/htdocs/mediawiki-1.23.2/extensions/Math/math/texvc '\''/tmp'\'' '\''/tmp'\'' '\''\int\limits_a^x f(\frac{\alpha}{2}\,)\,dxx'\'' '\''UTF-8'\'' '\''transparent'\''' 'MW_INCLUDE_STDERR=;MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=307200; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes'
[Math] TeX output:
 +15c8be621d90f691eb449a4699e14e87-
---
MessageCache::load: Loading de... got from global cache
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
Request ended normally
#EOF

ls -al /tmp/ | grep tex
-rw-r--r--  1 xyz-wiki xyz-wiki  172 Aug 18 14:45 17724_15c8be621d90f691eb449a4699e14e87.tex

/bin/bash '/var/www/xyz-wiki/htdocs/mediawiki-1.23.2/includes/limit.sh' '/var/www/xyz-wiki/htdocs/mediawiki-1.23.2/extensions/Math/math/texvc '\''/tmp'\'' '\''/tmp'\'' '\''\int\limits_a^x f(\frac{\alpha}{2}\,)\,dxx'\'' '\''UTF-8'\'' '\''transparent'\''' 'MW_INCLUDE_STDERR=;MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=307200; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes'

ls -al /tmp/ | grep tex
-rw-r--r--  1 xyz-wiki xyz-wiki  172 Aug 18 14:45 17724_15c8be621d90f691eb449a4699e14e87.tex
-rw-r--r--  1 xyz-wiki xyz-wiki  898 Aug 18 14:55 15c8be621d90f691eb449a4699e14e87.png
</pre>

Why is the png file only created when i run the command in the shell?
Why is the folder /tmp and not a folder inside the wiki_path?
Any idea why no PNGs are created via the Webserver?
Comment 1 physikerwelt 2014-08-18 15:27:37 UTC
Hi Christof,

thanks for your excellent BUG report.
The underlining problem is that currently Mathoid does not produce PNG images.
So you have to create them locally on your system which requires to install texvc.
This is a bad thing and should be changed.
Did you follow the guide on
https://www.mediawiki.org/wiki/Texvc

There might be an issue with the file permissions?
Comment 2 Gerrit Notification Bot 2014-08-25 21:34:34 UTC
Change 156195 had a related patch set uploaded by Physikerwelt:
Prevent Special:MathShowImage from showing bad content

https://gerrit.wikimedia.org/r/156195
Comment 3 Gerrit Notification Bot 2014-08-28 18:03:58 UTC
Change 156195 merged by Frédéric Wang:
Prevent Special:MathShowImage from showing bad content

https://gerrit.wikimedia.org/r/156195
Comment 4 physikerwelt 2014-10-19 22:31:47 UTC
Patch got merged. Let's assume that this has solved he problem.

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


Navigation
Links