I am running the following code on my Apache server to return the error since my script without 2<&1 returns no data:
== x.php
$run = "/usr/bin/perl x.pl 2<&1";
exec($run, $output, $input);
$count = count($output);
echo "Element count is " . $count . "<br>";
$test = $output[0];
print $test;
== x.pl
use Net::Telnet:

isco::IOS;
$connection = Net::Telnet:

isco::IOS->new(Host => "router");
$connection->login("xxxxxxxx", "xxxxxxxx");
@interfaces = $connection->listInts();
foreach $int ( @interfaces )
{
$desc = $connection->getIntDesc( $int );
$intip = $connection->getIntIP( $int );
printf("%10s: %30s: %20s: %100s: %s","Interface", $int, $intip, $desc, "\n\n");
}
When I run the php x.php file from a web broswer I get:
problem connecting to "router", port 23: Permission denied at x.pl line 23
When I run it from a command line I get:
Element count is 18<br> Interface: FastEthernet0/0:
On my Windows development machine I do not have this problem and have run into a brick wall trying to figure it out. Can someone please help??