Re: [Ssh-sftp-perl-users] problem with CGI
Brought to you by:
dbrobins
From: Fernando B. <fb...@cr...> - 2013-11-14 16:37:48
|
Thanks friend! But it is not my problem. If I execute a cmd that no returns nothing in stdout, it works. example: my $cmd = "svn --help"; (Page never load...) my $cmd = "svn --help > /dev/null"; (Page load OK and fast) And like I said, at command line both cases works nice. The problem is execute a cmd that returns anything to stdout page neve load and after a time get time out. 2013/11/14 Nigel Reed <ni...@sy...> > Have a look at this thread. > > > > http://www.tek-tips.com/viewthread.cfm?qid=1140435 > > > > *From:* Fernando Buzon [mailto:fb...@cr...] > *Sent:* Thursday, November 14, 2013 5:36 AM > *To:* ssh...@li... > *Subject:* [Ssh-sftp-perl-users] problem with CGI > > > > Hi guys. > > My script don't work in apache. > > > > look this: > > > > > > =================================================================== > > #!/usr/bin/perl > > > > > > use CGI; > > use HTTP::Request::Common qw(POST); > > use Net::SSH::Perl; > > use DateTime; > > use warnings; > > use strict; > > > > > > my $user = 'user'; > > my $pass = 'pass'; > > my $cmd = "svn --help"; > > my $ssh = Net::SSH::Perl->new('10.10.1.1'); > > $ssh->login($user, $pass); > > my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); > > > > if ($stdout) > > { > > print "stdout -> " . $stdout . "\n"; > > } > > else > > { > > print "stderr -> " . $stderr . "\n"; > > } > > print "exit -> " . $exit . "\n"; > > =================================================================== > > > > At line command this is ok but executing in apache the page never load... > Still loading page until time out. > > What's the problem? > help-me... > > Thanks! > |