[Pmwiki-users] Conflict between $EnableDiag and de graphviz cookbook.
Patrick R. Michaud
pmichaud
Wed Jan 5 08:37:08 CST 2005
On Wed, Jan 05, 2005 at 09:16:48AM +0100, Stubbe Paul wrote:
>
> What I found was that as long as $EnableDiag=0 graphviz works fine,
> But when I put $EnableDiag=1 I get messages like these on the pages that
> have graphviz on them:
> ----
> pat=/\(:graphviz\s*(.*?):\)/epat=/\(:graphwiki\s*(.*?):\)/e
> Warning: Cannot modify header information - headers already sent by
> (output started at c:\Bugzilla\farm\pmwiki.php:905) in
> c:\Bugzilla\farm\pmwiki.php on line 630
> ----
>
> Is this a problem with my configuration, or is this a problem with
> graphviz?
I just looked at graphviz_v4.php, and there is *definitely* a bug
several places in the code. Here's an example from line 72:
markup('graphviz','directive',
'/\\(:graphviz\\s*(.*?):\\)/e',"FmtGraphviz($1,'png')");
The $1 needs to have quotes around it, otherwise it's relying on
PHP to auto-stringify the parameter when it executes, and the
value of $1 might contain some other sort of expression. (Indeed,
as written it's possible for an author to use this to execute
any arbitrary PHP function.)
You're seeing the problem with $EnableDiag=1 because this
setting also turns on PHP's "track_errors" feature, which
reports back any errors encountered when executing the
markup conversions.
Pm
More information about the pmwiki-users
mailing list