Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: perl script not working after moved to new host

by poj (Abbot)
on Jan 26, 2016 at 07:58 UTC ( [id://1153650]=note: print w/replies, xml ) Need Help??


in reply to Re^4: perl script not working after moved to new host
in thread perl script not working after moved to new host

Try this cut down version of your program on both working and non-working systems and compare the contents of $ENV{'PATH'}

#!/usr/bin/perl use strict; use warnings; use CGI ':standard'; use CGI::Carp 'fatalsToBrowser'; my $node = param('node'); my $target = "raksan"; my $wwwpath = '/target'; my $wwwrealpath = "/home/nagios/stat/$target/htdocs"; my $tmpgraph = "rrd-$$.gif"; my $recenttimes = time - 3600 * 36; print header(),start_html(); my $cmd = "/home/nagios/stat/scripts/ng_rrd2img.sh $target $node dig $ +recenttimes now 300 130 > $wwwrealpath/tmp/$tmpgraph"; my $status = system($cmd); if ($status){ warn "$?"; } my $path = join "\n",split ';',$ENV{'PATH'}; print qq!<pre>$cmd</pre> <pre>PATH $path</pre> <img src="$wwwpath/tmp/$tmpgraph" alt="$wwwpath/tmp/$tmpgraph" border= +"1"/>!; print end_html();
poj

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1153650]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found