View Issue Details

IDProjectCategoryView StatusLast Update
0008694mantisbtreportspublic2020-11-26 02:38
Reporterstevemagruder Assigned Tograngeway  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformAMD Turion 64 X2 MobileOSWindows Vista Home PremiumOS VersionSP1, RC
Product Version1.1.0 
Summary0008694: Relationship/Dependency graphs fail
Description

Here's the error I'm getting when trying to view relationship or dependency graphs:

Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `WinGraphviz.NEATO': Invalid syntax ' in C:\Apache2\htdocs\mantis\core\graphviz_api.php:302 Stack trace: #0 C:\Apache2\htdocs\mantis\core\graphviz_api.php(302): om->com('WinGraphviz.NEA...') 0000001 C:\Apache2\htdocs\mantis\core\relationship_graph_api.php(426): Graph->output('cmap') 0000002 C:\Apache2\htdocs\mantis\bug_relationship_graph.php(131): relgraph_output_map(Object(Graph), 'relationship_gr...') 0000003 {main} thrown in C:\Apache2\htdocs\mantis\core\graphviz_api.php on line 302

I'm using Graphviz 2.16.1 on Windows Vista.

And my config settings related to graphs are as follows:

Enable relationship graphs support.

$g_relationship_graph_enable = ON;
$g_dot_tool = 'C:\Program Files\Graphviz2.16\bin\dot.exe';
$g_neato_tool = 'C:\Program Files\Graphviz2.16\bin\neato.exe';

TagsNo tags attached.

Relationships

duplicate of 0005037 closedgrangeway No more rel. graphs with PHP 4.3.10 and Win2K 

Activities

stevemagruder

stevemagruder

2007-12-24 13:56

reporter   ~0016502

I'm using PHP 5.2.4 and I had to recall that the COM support probably is broken, so I modified the graphviz_api code as directed before to avoid using COM.

garethrandall

garethrandall

2007-12-28 04:33

reporter   ~0016509

I noticed that PHP 5.2.5 has been released. Probably worth retrying on this and seeing if the error still occurs.

NMURTHY

NMURTHY

2007-12-28 07:49

reporter   ~0016510

hi..am just looking at the demo..it's nice to watch out.

stevemagruder

stevemagruder

2007-12-29 02:22

reporter   ~0016515

Just tested... Still broken with PHP 5.2.5

tjordanchat

tjordanchat

2008-01-29 11:55

reporter   ~0016876

Steve,
I'm having the same problem. Did you find a solution for this.

stevemagruder

stevemagruder

2008-01-29 12:01

reporter   ~0016877

I have not found any solution, nor am I really looking for one. I just disabled COM support and left it at that.

tjordanchat

tjordanchat

2008-01-29 14:16

reporter   ~0016878

My problem was that my windows machine was missing a component. I found this out my manually runing a php script which opens a COM object. Windows then pops up a dialog which says it is installing missing component. After the install, the script continued to run and created the file. I then re-tested Mantis Relationship graphs and they worked.

php.exe script.php

<?php
$word = new COM("word.application");
//To see the version of Microsoft Word, just use $word->Version
echo "I'm using MS Word {$word->Version}";
//It's better to keep Word invisible
$word->Visible = 0;
//Creating new document
$word->Documents->Add();
//Setting 2 inches margin on the both sides
$word->Selection->PageSetup->LeftMargin = '2"';
$word->Selection->PageSetup->RightMargin = '2"';
//Setup the font
$word->Selection->Font->Name = 'Verdana';
$word->Selection->Font->Size = 8;
//Write some text
$word->Selection->TypeText("Hello, universe!");
//Save the document as DOC file
$word->Documents[1]->SaveAs("C:\hello2.doc");
// or use: $word->Documents[1]->SaveAs("C:htdocshello2.rtf",6); to save as RTF file
// or use: $word->Documents[1]->SaveAs("C:htdocshello2.htm",8); to save as HTML file
//And of course, quit Word
$word->quit();
$word = null;
//Give the user a download link
echo 'hello2.doc';
?>

isunyu

isunyu

2008-02-26 00:15

reporter   ~0017200

I'm having the same problem here.So I ran the script.php,but there was no message that said the windows needs any componet.

php 5.2.5
apache 2.2
windows 2003

tjordanchat

tjordanchat

2008-02-26 09:13

reporter   ~0017203

Isunya,
Have you tested graphviz seperately. Graphviz can run stand-alone see if graphvis is working and then worry about the integration with Mantis.

isunyu

isunyu

2008-02-27 21:44

reporter   ~0017212

Hi,tjordanchat,
I didn't use graphviz.I use jpgraph-2.3 to achieve the graph function.
It performed well in the Summary page.

djcarr

djcarr

2008-04-08 03:58

reporter   ~0017570

I have the same error.

Windows 2000 SP4
Apache 2.2
PHP 5.2.5

I have tried it with both WinGraphViz and GraphViz.

The above script.php gave me:

Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `word.application': Invalid syntax ' in D:\WebRoot\Mantis\comcheck.php:2 Stack trace: #0 D:\WebRoot\Mantis\comcheck.php(2): com->com('word.applicatio...') 0000001 {main} thrown in D:\WebRoot\Mantis\comcheck.php on line 2

frankgiesche

frankgiesche

2008-06-18 12:11

reporter   ~0018131

I had the same error using graphviz. After changing to the WinGraphviz it works under PHP 5.2.6 and WinXP.
I found that errormessage in the com_exception is not correct : It is not an invalid syntax but there is no COM object available on the system for the name 'WinGraphviz.NEATO' .
Perhaps someone should move the default COM objectname in graphviz_api.php line 185 to a configurable objectname.
I didn't figure out what the correct COM objectname is for Graphviz, but i assume that 'WinGraphviz.NEATO' is not.
As documented the config of $g_dot_tool and $g_neato_tool is not used on Windows.

konstbel

konstbel

2008-09-12 10:02

reporter   ~0019393

Relationship/Dependency graphs does not diplayed

Win2003
WinGraphviz 1.02.24
Mantis 1.1.1
PHP 5.1.4.4
$g_relationship_graph_enable = ON;
$g_relationship_graph_fontname = 'Arial';
$g_relationship_graph_fontsize = 8;

Is there any way to find why?
May be someone have test script, generating simple image, to temporary substitute bug_relationship_graph_img.php ?

konstbel

konstbel

2008-09-22 05:09

reporter   ~0019421

Nobody knows?
I try to create simple graphviz script, generating image.
When I run
php mysample.php > image.png
I got the normal image.png file, that can be displayed, but running the same script via Apache results in "Application Failure httpd.exe 2.2.2.0 in ntdll.dll 5.2.3790.3959 at offset 0001a379"
Any ideas?
I think there must be some configuration problem, isn't it?

konstbel

konstbel

2008-09-22 08:22

reporter   ~0019423

Uff... Thanks to shadow0, problem is solved.
I'll never guess that account that Apache works under, needs Create Files/Write Data access rights to C:\ !!!
--- citaition 0005037:0013317 ----
Just open the NTFS permissions for C, click Advanced, then for whatever group/user you want to be able to see relationship graphs just add a new permission for Create Files/Write Data pertaining only to the current directory (i.e. NOT subfolders and files).
--- end of citation ----

zhenxin0603

zhenxin0603

2008-11-20 21:45

reporter   ~0019963

i am bad english ,sorry
i have solved

  1. regsvr32 /u wingraphviz.dll
  2. copy wingraphviz.dll to c:\windows\system32
  3. regsvr32 c:\windows\system32\wingraphviz.dll
  4. restart apache2
    ok
    apache 2.0.59
    xp sp2
    php 5.21
    wingraphvize 1.0.2.24
grangeway

grangeway

2010-08-14 14:39

reporter   ~0026317

Fixed by removing support for wingraphviz - just use the dot/neato exe's - see snapshot/commit @ http://git.mantisforge.org/w/mantisbt.git?a=commit;h=629a6760104e5f742ad54b5a765be78d4c42eef3

Related Changesets

MantisBT: master 629a6760

2010-08-14 14:17

grangeway


Details Diff
Fix: 0005037
Fix: 0006620
Fix: 0006178
Fix: 0008694

Remove support for wingraphviz. If people don't want to allow IIS to access cmd.exe, it would probably
be more sensible to write a dotnet wrapper around graphviz (e.g. http://implicitoperator.com/blog/2009/12/24/rendering-an-in-memory-graphviz-image-with-c.html)

However, that still needs a medium/full trust environment in asp.net I believe.

Windows users can install graphviz by downloading, the MSI from graphviz.org, allowing access to cmd.exe to the php application pool in IIS, and modifying the dot/neato paths.
Affected Issues
0005037, 0006178, 0006620, 0008694
mod - core/graphviz_api.php Diff File
mod - config_defaults_inc.php Diff File