Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by Old_Gray_Bear (Bishop)
on Jan 26, 2016 at 00:33 UTC ( #1153626=note: print w/replies, xml ) Need Help??


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

And what happened after you fixed these errors?

----
I Go Back to Sleep, Now.

OGB

  • Comment on Re^3: perl script not working after moved to new host

Replies are listed 'Best First'.
Re^4: perl script not working after moved to new host
by prabhakard (Novice) on Jan 26, 2016 at 03:37 UTC

    after fix the permission error, from shell I can run that shell script(system)-------------------- same script when we calling from perl script not working,.....................it through system error 256 on browser

    Again please note that the same script working via perl on other system without any issue.

    Please help me to identify the issue on this system

      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
Node Status?
node history
Node Type: note [id://1153626]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2018-06-18 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (109 votes). Check out past polls.

    Notices?