View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005037 | mantisbt | relationships | public | 2004-12-22 15:12 | 2020-11-26 02:38 |
Reporter | masc | Assigned To | grangeway | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | X86 | OS | Windows | OS Version | Win2K |
Product Version | 0.19.2 | ||||
Target Version | 1.3.0-beta.1 | Fixed in Version | 1.3.0-beta.1 | ||
Summary | 0005037: No more rel. graphs with PHP 4.3.10 and Win2K | ||||
Description | Using PHP 4.3.10 (same config ini used in 4.3.9), all the relationship graphs are no more working. The problem seems to be in the graph library. | ||||
Tags | No tags attached. | ||||
Attached Files | graphviz_api_php_cmdline_util.diff (1,792 bytes)
280c280,281 < if ( 'WIN' == substr( PHP_OS, 0, 3 ) ) { --- > # if ( 'WIN' == substr( PHP_OS, 0, 3 ) ) { > if ( 0 ) { 327c328,329 < } else if ( php_version_at_least( '4.3.0' ) ) { --- > # } else if ( php_version_at_least( '4.3.0' ) ) { > } else if ( 0 ) { 369,370c371,374 < if ( isset( $_ENV['TMPDIR'] ) ) < $t_tmpdir = $_ENV['TMPDIR']; --- > # if ( isset( $_ENV['TMPDIR'] ) ) > # $t_tmpdir = $_ENV['TMPDIR']; > if ( isset( $_ENV['TMP'] ) ) > $t_tmpdir = $_ENV['TMP']; 375a380,381 > $t_bitmap = $t_filename . '.' . $p_format; > register_shutdown_function( 'unlink', $t_bitmap ); 383a390 > ' -o' . $t_bitmap . ' ' . 390c398,402 < passthru( $t_command ); --- > header( 'X-Command: ' . $t_command ); > header( 'X-TempFile: ' . $t_filename ); > # passthru( $t_command ); > system( $t_command ); > echo file_get_contents( $t_bitmap ); 395c407,409 < passthru( $t_command ); --- > # passthru( $t_command ); > system( $t_command ); > echo file_get_contents( $t_bitmap ); | ||||
related to | 0015721 | closed | grangeway | Functionality to consider porting to master-2.0.x |
has duplicate | 0006620 | closed | grangeway | Relationgraph is not displayed |
has duplicate | 0006178 | closed | grangeway | relationship graph is empty |
has duplicate | 0008694 | closed | grangeway | Relationship/Dependency graphs fail |
related to | 0027584 | closed | dregad | Out of the box Mantis does not display either a Dependancy or Relationship Graph |
I'll start labeling issues as YAGVBUW (Yet Another GraphViz Bug Under Windows)... It is just fine under linux, with Apache 2.0.51, PHP 4.3.10, MySQL 3.23.58 and GraphViz 2.0. Can't you get some more information? What happens? Just a blank page? |
|
Same issue with me. PHP 4.3.6 and Win2K and no errors only a blank page appears. Can't find any debugging info anywhere on GraphViz. |
|
The problem seems located in graphwiz_api.php->output() in: It returns null and then no images at all. |
|
Try reinstalling wingraphviz, so the COM object gets re-registered. If this is not the problem, then it looks like the COM interface got broken somehow on 4.3.10. |
|
I tried to re-install WinGraphViz, but nothing happened. |
|
http://bugs.php.net/bug.php?id=30906 |
|
Err... WTF... Mantis broke the url on `?´... just join the two pieces, or open bugs.php.net and go directly to bug 30906. BTW, we should put a warning on config_defaults_inc.php and core/relationship_graphs_inc.php and set this issue as wont fix. There isn't anything to do but to blame PHP developers. |
|
I was able to get the Relationship Graphs working with the Win32 command line version of Graphviz 2.00 under Windows 2003, IIS 6.0, PHP 4.3.10, Mantis 0.19.2.
|
|
" http://140.116.72.154/svn/WinGraphviz/ |
|
leighton: php/webserver user needs access to cmd.exe to run that though? |
|
leighton, The graphviz system was originally designed this way, until I found that passthru, proc_open and system use cmd.exe instead of spawning dot.exe/neato.exe directly. This leads to a security risk, and then we chose to use WinGraphviz. Some of your changes were basically a revert of what was done originally on 0004434. But why did you use passthru? proc_open is preferred, since we can pipe the output to dot/neato and let them pipe the graph back to the webserver. |
|
Yes, you need access to cmd.exe. I had another tool, cacti ( http://www.cacti.net/ ) that had the cmd.exe dependency for php. Sorry that I had forgotten about that. I didn't go down the proc_open route as it looked messier (not being much of a PHP person) and I was limited on time on Friday. I agree the COM interface is MUCH preferrable, but the comments that I had seen indicated that there wasn't much development activity and that this was likely to remain buggy for some time. Somehow my searches missed bug 0004434 so I missed much of the history of this feature ;-) I also saw a very similar fix made on Friday in the forums (after I posted my bug, of course) and discovered that there is a newer version of the Graphviz utilties for Windows. |
|
I've got a little closer to getting this one working. PHP 4.3.11 seems to have fixed the some of the COM() problems, but I can still only get the graphs to work if I make the IUSR account (used for annonymous access in IIS) a member of Administrators. Otherwise, PHP reports an access violation. So I assume it's some file permission or security rights issue, but I can't figure out exactly what the problem is. IUSR has read+execute permissions to the WinGraphviz.dll itself, so I don't think that's the issue. Is there a right that must be granted to IUSR to allow it to instantiate COM objects? Does WinGraphviz create temp files anywhere? Config: |
|
It's working for me. Here's my setup: Client: Win2K, WinGraphviz 1.02.24 (msi), either IE6 or Firefox 1.5.0.1 |
|
I was able to make WinVizGraph partially work under my setup (W2K Server, Apache 2.0.55, PHP 5.1.2), using 1.0.2.25 and 1.0.2.24. 1.0.2.26 looks to be buggy and generates only partial images or no images at all on my system. relgraph_output_map( $t_graph, 'relationship_graph_map' ); in bug_relationship_graph.php, because $p_graph->output( 'cmap' ); returns what looks an empty string. It could be a workaround, although the graph become "static". |
|
I've just spent most of this morning dealing with the same problem. I've finally found a solution, so I'll post it here just in case it helps anyone having the problem in the future. WinGraphViz on PHP6 seems to require write access to the root of the C drive (or presumably wherever you installed windows) 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). I'm running: |
|
Why isn't this in the platform yet ? I've just made this work by using posts that are several years old. Don't use WinGraphviz it's to old, just use Graphviz for Windows and do the folowing:
Please put this into 1.1.0. |
|
Since the patch attachment is missing, where is the specific code patch to mantis\core\graphviz_api.php to get Mantis working with Graphviz for Windows? |
|
There is no 'specific code patch', it is just a question about disabling the current functionality when running on Windows. In graphviz_api.phi where this is done (aprox. line 280) if ( 'WIN' == substr( PHP_OS, 0, 3 ) ) { just change WIN to something else like WIN, and run like standard. It works on Windows Xp, Apache, MySql, Php 5.xx |
|
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 |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master 629a6760 2010-08-14 14:17 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 |