problems using graphviz perl module from apache (windows)

PERL

    Next

  • 1. Perl scripts interconnectivity... Is it possible...
    Is there any way for Perl script to use subroutines from another one? Thanks.
  • 2. passing arg to sub problem
    hi, i am new to perl and am trying to convert the code below into a subroutine but have a problem concering the reading of the input. i am trying to pass an array as an argument to the subroutine. the array is produced earlier in the program and needs to be passed to the subroutine. @array holds LINES of words separated by whitespace. so, $array[0] will be one line from the DATA below. the code below runs fine as a separate program but I don't know how to pass @array as an argument to the function. could someone help me with this simple problem? i hope i worded it clearly. thanks, slash ----CODE----------- while (<>) { @tmp=split; push @AoA, [@tmp]; } for $row(@AoA) { push @$row, $ARGV; print "@$row\n"; } -----DATA------ regular expressions are used by many programs such as the UNIX commands grep sed awk ------ thanks, slash
  • 3. Linking PDF forms with SQL
    Does any one know how would you link PDF form fields with SQL database using ASP perl? I want to extract the data from the PDF form and insert it into the database and vice versa. I read a lot about using FDF (File data format) but I am having a hard time implementing it. Would really appreciate any suggestions you may have. Thanx, Aditya.
  • 4. Data::Dumper How to quote keys while dumping
    I am trying to dump a hash using Data::Dumper. I need to quote the keys while dumping. My progarm looks like this use Data::Dumper; $Data::Dumper::Quotekeys = 1; $Data::Dumper::Useqq = 1; my %tmp ; $tmp{'1'} = "l"; $tmp{'2'} = "u"; open (STDOUT, ">"); print STDOUT Data::Dumper->Dump([\%tmp], ['*tmp']); close STDOUT ; --------------------------------------------------- Output %tmp = ( 1 => "l", 2 => "u" ); --------------------------------------- i need it as %tmp = ( '1' => "l", '2' => "u" ); Can anyone help out with this Thanks Kamal

problems using graphviz perl module from apache (windows)

Postby Sergio » Sun, 06 Mar 2005 07:57:08 GMT

I'm writing a cgi script that uses graphviz (the dot program) to
generate a graph and I'm banging my head against the wall trying to get
it to work properly. Currently, if I run the script directly from the
command line, it will work properly and generate my graph (which gets
dumped into a file). If I invoke the script as a cgi script within
apache, it runs fine until it calls the as_png() function, at which
point it will die waiting for a result (the destination file is created
but is empty).

I'm running SERVER_SOFTWARE="Apache/2.0.52 (Win32)"
and version 1.8 of the GraphViz module. If I run a printenv.cgi, I get
the following path:

PATH="C:\Program Files\Perl\bin\;C:\Program Files\Reflection;C:\PROGRAM
FILES\THINKPAD\UTILITIES; C:\Program
Files\Java\j2re1.4.2_01\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Oracle\ora81\bin;C:\Program
Files\Oracle\jre\1.1.7\bin;C:\ISIS;C:\PROGRA~1\COMMON~1\MDL
Shared\ISIS;C:\PROGRA~1\ATT\Graphviz\bin;C:\PROGRA~1\ATT\Graphviz\bin\tools"

which does seem to have the correct path settings for dot.exe.

The error that the apache log gives me is: Premature end of script
headers: simplegraph.pl

If I remove the line that calls as_png(), the script runs fine.

Any assistance would be most appreciated. I've searched usenet but to
no avail...

Thanks!

Sergio.


Re: problems using graphviz perl module from apache (windows)

Postby Sergio » Wed, 09 Mar 2005 02:12:03 GMT

Another piece of the puzzle:  The CGI script *does* seem to be
correctly invoking the dot.exe program. However, dot.exe is running
forever and never comes back, which is why the cgi script remains
seemingly hung...  I notice that graphviz.pm calls dot.exe using a
"run" command. I'm not familiar with it... Any hints?

Sergio.


Similar Threads:

1.several problems with cygwin perl, Activeperl, perlmagick and Apache (Windows)

Hi!

I want to use ImageMagick with PerlMagick and cgis with Apache for
cygwin.
My problem is that ImageMagick just works with ActivePerl and cgis just
work with cygwin perl.
So I tried to install both but some of my perlscripts  that use
ImageMagick also use bash commands (like "file") and also if I call
ActivePerl with its complete path it stops because it tells that some
dlls cannot be found also they are there.

So my questions are:
Has anybody succeeded in installing PerlMagick with cygwin perl (that
would be my preferred solution)

or

Has anybody installed both perls  and some advice for me?

or

Does anybody use cygwin Apache with ActivePerl?

Thanks a lot in advance,
Dani

2.Problem using more than 1 module in Windows (XS) - please help

Hi all
	I have a problem that I am running into while using Perl XS to build
an interface to my C++ library. This is on a windows machine with perl
5.6.1. I was able to use PerlXS to expose out different 'c++
classes' that my API supports. I wrote the .XS files for each of
these objects and now I am able to make a simple test.pl file and use
these objects from Perl. The problem comes when I try to use more than
1 object (module) in a single .pl file. Here would an example

========== working example perl script  ================

use lib "C:/Documents and Settings/myusername/Desktop/perl
experiment/api";
use MyDataReader;
my $dr = new MyDataReader("hsd_demo_pre");
$dr->execQuery("select * from bug");
print "fields: " . $dr->getFieldCount() . "\n";


================== perl script giving problem =============
use lib "C:/Documents and Settings/myusername/Desktop/perl
experiment/api";
use MyDataReader;

use MyAdmin;   # Adding this line gives problems


my $dr = new MyDataReader("hsd_demo_pre");
$dr->execQuery("select * from bug");
print "fields: " . $dr->getFieldCount() . "\n";


========= Error Message ==================

C:\Documents and Settings\myusername\Desktop\perl experiment\api>perl
test.pl
Can't load 'C:\Documents and Settings\ myusername \Desktop\perl
experiment\api/5.6.1
/MyAdmin.dll' for module MyAdmin: load_file:Attempt to access invalid
address at C
:/Perl/lib/DynaLoader.pm line 206.
Compilation failed in require at test.pl line 11.
BEGIN failed--compilation aborted at test.pl line 11.


So the problem shows up when I use more than one 'use' statements
in a perl script. Its important to note here that I can use the
'MyAdmin' module by itself just fine. So its not aproblem with that
module. The problem is only when I try to use more than 1 module in a
single perl script.

==================== Makefile.PL ===================
use ExtUtils::MakeMaker;
$CC = 'cl';
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile( 'NAME' => 'MyDataReader',
               'VERSION' => '0.10',
               'DEFINE'	=> '-TP -EHsc',     # e.g., '-DHAVE_SOMETHING'
               'CC' => $CC,
               'LDDLFLAGS' => '-nologo -libpath:"C:\Perl\lib\CORE"
-machine:x86',
			   'LIBC' => 'msvcrtd.lib',
			   'LDLOADLIBS' => 'oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib  netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib msvcrtd.lib',
			   'CCFLAGS' => '-nologo -O1 -MDd -DNDEBUG -DWIN32 -D_CONSOLE
-DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX',
               'LD' => '$(CC)',
               'XSOPT' => '-C++',
			   'OPTIMIZE' => '-O1 -MDd -DNDEBUG',
               'PERM_RW' => '664',
               'PERM_RWX' => '775',
               'TYPEMAPS' => ['perlobject.map']    ,
			    'INC'      => "-Iinclude",
          	'MYEXTLIB' => 'lib\myexternalapi.lib'
		       );

========== end =========

3.GraphViz in Windows hangs

I am using perl in windows and want to use the GraphViz module to
interface with GraphViz.  When I run any simple example program, a cmd
prompt window for dot.exe opens and hangs there.  My perl script
creates the output file but it is empty.  Does anyone know how to get
GraphViz to work on Windows???

4.Using GraphViz

Hi,
I am using GraphViz to obtain graphical images of a network (network
has nodes & edges) with Neato as the drawing tool. I was wondering if
the following could be done & if so how are they done?

(1) Represent different edges by varying their thickness. I found that
edges can be represented with different colors but is there a way to
represent them with varying thickness?

(2) My image is also a map & I saw how one can associate nodes with
URL's. Similarly is there a way to associate edges with URL's ? Also,
how to make the node/edge when clicked to open up a new page instead of
showing the contents of the URL in the same page? [I tried using the
"-Target=>new" tag unsuccessfully ... may be I am just putting it in
the wrong place]

(3) My input file for neato to generate a JPG image is quite large with
over 200 nodes and edges. I used "overlap = false" to avoid edge & node
overlaps ... however this leads to "Segmentation Faults". Is there
anyway to overcome this without sacrificing the separation of nodes &
edges? [Note: I do not get the segmentation fault in the absence of
avoiding overlap]

Thanks for any suggestions/comments/advice!!

Divya

5.Using MQSeries module with Perl on Windows

Hello,

I am hoping someone would be able to help me use the MQSeries module for Perl on Windows.  I have attempted to use the following steps to get the module installed. Everything seems to fail and cannot get it installed.



Perl: Installing MQSeries CPAN module on Windows XP

Steps to get it installed:
1.

Open a command prompt (Start->Run->cmd.exe)
2.      An alternative to this step is to open a Visual Studio 2008 Command Prompt (Start->All Programs->Microsoft C++ 2008 Express Edition->Visual Studio Tools->Visual Studio 2008 Command Prompt)
3.      Open CPAN from the same window (perl -MCPAN -e shell)
4.      Run install MQSeries. If CPAN complains saying that it doesn't know what MQSeries is, do m MQSeries first.
5.      Now, if all goes well, it will fail during make test. That's normal (I've never figured out how to set MQSeries up in a way that it won't fail during test. Neither has anyone I know.)
6.      If make test was the only place where it failed, run force install MQSeries to get it installed regardless of make test.



6. File::Find problem on windows+apache+activePerl

7. Apache Oracle load module problem

8. Problem running Perl under Cygwin using Windows native 8.0



Return to PERL

 

Who is online

Users browsing this forum: No registered users and 73 guest