in reply to perl script not working after moved to new host

You find the real error message in your web server error log. Look at that and remedy the cause.

Also, I really suggest you rewrite this script. It is horribly insecure and allows for arbitrary remote code execution:

$node = param("node"); ... $sysinfo = `sudo -u rsnagios ssh $node bin/sysinfo|sed s/-/_/`;

$node is not sanitized or checked against a list of valid hostnames. If you call your script with node="wget http://perlmonks.org" it will run the wget executable. As a first fix, you should only allow hostnames that match \w+ in $node.

Replies are listed 'Best First'.
Re^2: perl script not working after moved to new host
by prabhakard (Novice) on Jan 25, 2016 at 10:36 UTC
    I have tried by replace node= "actual valid hostname" but still it is not negerating when I run from shell like this it is working fine, gif image file $ perl -w ngcf.pl node=<hostname> but from browser if we run it is generating empty gif image file.