Page MenuHomePhabricator

When rendering math, TeX output is sent to stderr which ends up in Apache's error log
Closed, InvalidPublic

Description

Author: healyk

Description:
When TeX is executed by MathRenderer->render() to render math, the informational messages that TeX prints to stderr end up in Apache's error log because stderr is not redirected.

In my opinion, this is not the correct behavior, as

  1. These are informational messages, not errors
  2. These messages are written directly to Apache's error log without any time, date or severity information.

The relevant code is Math.php line 72:

$contents = $cmd;

Suggested fix: Alter this line to

$contents = $cmd 2>/dev/null;

Could this fix have any unforeseen consequences?


Version: unspecified
Severity: minor

Details

Reference
bz18647

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:35 PM
bzimport added a project: Math.
bzimport set Reference to bz18647.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

Suggested fix: Alter this line to

$contents = $cmd 2>/dev/null;

Could this fix have any unforeseen consequences?

My gut says 2> redirection doesn't work on Windows shells, although I might be wrong; /dev/null needs to be different on Windows at least.

physik wrote:

I don't know if that's still relevant. But wfShellExec is used now. So it would be a core issue. Feel free to reopen it as core bug.