View Issue Details

IDProjectCategoryView StatusLast Update
0005037mantisbtrelationshipspublic2014-12-08 00:34
ReportermascAssigned Tograngeway 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformX86OSWindowsOS VersionWin2K
Product Version0.19.2 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0005037: 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.
Are the graphs still well working on Linux?

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

jferraz

jferraz

2004-12-22 17:46

reporter   ~0008768

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?

suhavna

suhavna

2004-12-22 18:38

reporter   ~0008771

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.

masc

masc

2004-12-23 01:31

reporter   ~0008776

The problem seems located in graphwiz_api.php->output() in:
$t_graphviz = new COM( $this->graphviz_com_module );

It returns null and then no images at all.

jferraz

jferraz

2004-12-23 06:06

reporter   ~0008778

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.

masc

masc

2004-12-23 14:20

reporter   ~0008790

I tried to re-install WinGraphViz, but nothing happened.

jferraz

jferraz

2004-12-23 14:39

reporter   ~0008791

http://bugs.php.net/bug.php?id=30906
Check there, you'll have a surprise.

jferraz

jferraz

2004-12-23 14:44

reporter   ~0008792

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.

leighton

leighton

2005-02-27 11:33

reporter   ~0009392

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.

  • Downloaded Win32 Graphviz from http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.0.exe

    • Installed to my web support applications directory: D:\Apps\bin\Graphviz-2.00
  • Patched .\core\graphviz_api.php (v 1.4 2004/11/07)

    • See attached diff file graphviz_api_php_cmdline_util.diff
    • The patch is a bit of a quick hack but I didn't want to disturb the non-Windows code as much as possible as I have no facility to confirm its behaviour.
    • Basically, I had two issues:
    • First, the TMPDIR environment variable isn't befined by default on Windows so I used TMP instead.
    • Second, I couldn't get the passthru to capture the output correctly (unable to determine if this is a PHP/Graphviz issue) so I called via system, creating a second temp file, whose contents were passed back to the browser.
  • Configured appropriately in config_inc.php
    $g_dot_tool = 'D:\Apps\bin\Graphviz-2.00\bin\dot.exe';
    $g_neato_tool = 'D:\Apps\bin\Graphviz-2.00\bin\neato.exe';

  • Permissions note: the IUSR_<servername> account needs modification rights on the temporary directory.

2005-02-27 11:34

 

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 );

grangeway

grangeway

2005-02-27 18:56

reporter   ~0009393

"
WinGraphviz news
headlines below...
You can get it by SVN

http://140.116.72.154/svn/WinGraphviz/
http://140.116.72.154/svn/graphviz-1.8.10/
http://140.116.72.154/svn/freetype/
http://140.116.72.154/svn/libjpeg/
"
hmm..., this might be useful for debugging why the COM support was 'unstable'

grangeway

grangeway

2005-02-27 18:57

reporter   ~0009394

leighton: php/webserver user needs access to cmd.exe to run that though?

jferraz

jferraz

2005-02-27 22:57

reporter   ~0009395

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.

leighton

leighton

2005-02-28 09:44

reporter   ~0009401

Last edited: 2005-02-28 09:45

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.

mmchenry

mmchenry

2005-04-26 16:20

reporter   ~0009929

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:
PHP 4.3.11
Server 2003+IIS6
ISAPI
Mantis 0.19.2 and 1.0.0a2

stevemagruder

stevemagruder

2006-02-08 18:40

reporter   ~0012117

It's working for me. Here's my setup:

Client: Win2K, WinGraphviz 1.02.24 (msi), either IE6 or Firefox 1.5.0.1
Server: Mandriva 2006, PHP 5.0.4, Apache 2.0.54

ldsandon

ldsandon

2006-02-22 15:49

reporter   ~0012211

Last edited: 2006-02-23 05:04

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.
I found out that WinVizGraph cannot generate CMAP, and that blocks the page generation. To make it work I had to comment out line:

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".

shadow0

shadow0

2006-08-23 08:38

reporter   ~0013317

Last edited: 2006-08-23 08:39

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.


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:
IIS6 on Windows Server 2003
Mantis 1.0.5
WinGraphViz 1.02.24

jci000

jci000

2007-05-22 07:58

reporter   ~0014589

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:

  • Install Graphviz on the server
  • Patch mantis\core\graphviz_api.php to this if ( 'WIN' == substr( PHP_OS,
  • In config_inc.php enable the function and set paths

    $g_relationship_graph_enable = ON;
    $g_dot_tool = '"C:\Program Files\ATT\GraphViz\bin\dot.exe"';
    $g_neato_tool = '"C:\Program Files\ATT\GraphViz\bin\neato.exe"';

Please put this into 1.1.0.

stevemagruder

stevemagruder

2007-05-22 10:30

reporter   ~0014593

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?

jci000

jci000

2007-05-23 01:20

reporter   ~0014600

Last edited: 2007-05-23 10:25

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

grangeway

grangeway

2010-08-14 14:37

reporter   ~0026314

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

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036493

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Issue History

Date Modified Username Field Change
2004-12-22 15:12 masc New Issue
2004-12-22 17:46 jferraz Note Added: 0008768
2004-12-22 18:38 suhavna Note Added: 0008771
2004-12-23 01:31 masc Note Added: 0008776
2004-12-23 06:07 jferraz Note Added: 0008778
2004-12-23 14:20 masc Note Added: 0008790
2004-12-23 14:39 jferraz Note Added: 0008791
2004-12-23 14:44 jferraz Note Added: 0008792
2005-02-27 11:33 leighton Note Added: 0009392
2005-02-27 11:34 leighton File Added: graphviz_api_php_cmdline_util.diff
2005-02-27 18:56 grangeway Note Added: 0009393
2005-02-27 18:57 grangeway Note Added: 0009394
2005-02-27 22:57 jferraz Note Added: 0009395
2005-02-28 09:44 leighton Note Added: 0009401
2005-02-28 09:45 leighton Note Edited: 0009401
2005-04-26 16:20 mmchenry Note Added: 0009929
2006-02-08 18:40 stevemagruder Note Added: 0012117
2006-02-22 15:49 ldsandon Note Added: 0012211
2006-02-23 05:04 ldsandon Note Edited: 0012211
2006-08-23 08:38 shadow0 Note Added: 0013317
2006-08-23 08:38 shadow0 Note Edited: 0013317
2006-08-23 08:39 shadow0 Note Edited: 0013317
2007-05-22 07:58 jci000 Note Added: 0014589
2007-05-22 10:30 stevemagruder Note Added: 0014593
2007-05-23 01:20 jci000 Note Added: 0014600
2007-05-23 10:25 jci000 Note Edited: 0014600
2010-08-14 14:37 grangeway Note Added: 0026314
2010-08-14 14:37 grangeway Status new => resolved
2010-08-14 14:37 grangeway Fixed in Version => 1.3.0-beta.1
2010-08-14 14:37 grangeway Resolution open => fixed
2010-08-14 14:37 grangeway Assigned To => grangeway
2013-04-05 17:57 grangeway Status resolved => acknowledged
2013-04-05 17:57 grangeway Note Added: 0036493
2013-04-05 18:06 grangeway Relationship added related to 0015721
2013-04-06 09:26 dregad Tag Attached: 2.0.x check
2013-04-06 09:26 dregad Status acknowledged => resolved
2013-04-27 17:42 atrol Target Version => 1.3.0-beta.1
2014-09-23 18:04 grangeway Tag Detached: 2.0.x check
2014-12-08 00:34 vboctor Status resolved => closed