Scratching my head with an issue where my Perl CGI output is being
truncated, however when running directly from the command line it
works. I've tried apache2 without any chance.
Below is a minimal version of a script I'm useing to pull info from a
Cisco router and display in the web browser:
---
#!/usr/bin/perl -w
The problem being the output is being truncated:
---
Testing...
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to <ip_addr>, timeout is 2 seconds:
!
---
Missing:
---
!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms
---
I'm running:
# perl -v
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source
kit.
Complete documentation for Perl, including FAQ lists, should be found
on
this system using "man perl" or "perldoc perl". If you have access to
the
Internet, point your browser at http://www.perl.org/, the Perl Home
Page.
# apache -v
Server version: Apache/1.3.34 (Debian)
Server built: Jan 18 2008 19:16:57
---
On Tue, Oct 28, 2008 at 9:58 AM, dippa <gerard.sha...@gmail.com> wrote:
> Hi,
> Scratching my head with an issue where my Perl CGI output is being > truncated, however when running directly from the command line it > works. I've tried apache2 without any chance.
> Below is a minimal version of a script I'm useing to pull info from a > Cisco router and display in the web browser: > --- > #!/usr/bin/perl -w
> The problem being the output is being truncated: > --- > Testing...
> Type escape sequence to abort. > Sending 5, 100-byte ICMP Echos to <ip_addr>, timeout is 2 seconds: > ! > ---
> Missing: > --- > !!!! > Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms > ---
> I'm running: > # perl -v
> This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
> Copyright 1987-2006, Larry Wall
> Perl may be copied only under the terms of either the Artistic License > or the > GNU General Public License, which may be found in the Perl 5 source > kit.
> Complete documentation for Perl, including FAQ lists, should be found > on > this system using "man perl" or "perldoc perl". If you have access to > the > Internet, point your browser at http://www.perl.org/, the Perl Home > Page.
> # apache -v > Server version: Apache/1.3.34 (Debian) > Server built: Jan 18 2008 19:16:57 > ---
On Tue, Oct 28, 2008 at 9:58 AM, dippa <gerard.sha...@gmail.com> wrote:
> Hi,
> Scratching my head with an issue where my Perl CGI output is being > truncated, however when running directly from the command line it > works. I've tried apache2 without any chance.
> Below is a minimal version of a script I'm useing to pull info from a > Cisco router and display in the web browser: > --- > #!/usr/bin/perl -w
> The problem being the output is being truncated: > --- > Testing...
> Type escape sequence to abort. > Sending 5, 100-byte ICMP Echos to <ip_addr>, timeout is 2 seconds: > ! > ---
> Missing: > --- > !!!! > Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms > ---
> I'm running: > # perl -v
> This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
> Copyright 1987-2006, Larry Wall
> Perl may be copied only under the terms of either the Artistic License > or the > GNU General Public License, which may be found in the Perl 5 source > kit.
> Complete documentation for Perl, including FAQ lists, should be found > on > this system using "man perl" or "perldoc perl". If you have access to > the > Internet, point your browser at http://www.perl.org/, the Perl Home > Page.
> # apache -v > Server version: Apache/1.3.34 (Debian) > Server built: Jan 18 2008 19:16:57 > ---
bo luck with the suggested changes, have also tried with the same
result:
---
open(RSH,"rsh dslcore2.syd.pacific.net.au ping 203.12.144.90 |") ||
die "Failed: $!\n";
while ( <RSH> ) {
print;
}
---
From the command line they do however work, just not when run through
Apache (tried apache2 as well)...
On Oct 28, 4:24 pm, "Praveen P" <pravee...@gmail.com> wrote:
> On Tue, Oct 28, 2008 at 9:58 AM, dippa <gerard.sha...@gmail.com> wrote:
> > Hi,
> > Scratching my head with an issue where my Perl CGI output is being
> > truncated, however when running directly from the command line it
> > works. I've tried apache2 without any chance.
> > Below is a minimal version of a script I'm useing to pull info from a
> > Cisco router and display in the web browser:
> > ---
> > #!/usr/bin/perl -w
> > This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
> > Copyright 1987-2006, Larry Wall
> > Perl may be copied only under the terms of either the Artistic License
> > or the
> > GNU General Public License, which may be found in the Perl 5 source
> > kit.
> > Complete documentation for Perl, including FAQ lists, should be found
> > on
> > this system using "man perl" or "perldoc perl". If you have access to
> > the
> > Internet, point your browser athttp://www.perl.org/, the Perl Home
> > Page.
> > # apache -v
> > Server version: Apache/1.3.34 (Debian)
> > Server built: Jan 18 2008 19:16:57
> > ---
if its working fine from command line .. and not from web .. an smell some env issues.. try running the script from command line with user as with apache works...
> bo luck with the suggested changes, have also tried with the same > result: > --- > open(RSH,"rsh dslcore2.syd.pacific.net.au ping 203.12.144.90 |") || > die "Failed: $!\n"; > while ( <RSH> ) { > print; > } > ---
> From the command line they do however work, just not when run through > Apache (tried apache2 as well)...
> On Oct 28, 4:24 pm, "Praveen P" <pravee...@gmail.com> wrote: > > let me know whether that worked or not
> > On Tue, Oct 28, 2008 at 9:58 AM, dippa <gerard.sha...@gmail.com> wrote:
> > > Hi,
> > > Scratching my head with an issue where my Perl CGI output is being > > > truncated, however when running directly from the command line it > > > works. I've tried apache2 without any chance.
> > > Below is a minimal version of a script I'm useing to pull info from a > > > Cisco router and display in the web browser: > > > --- > > > #!/usr/bin/perl -w
> > > This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
> > > Copyright 1987-2006, Larry Wall
> > > Perl may be copied only under the terms of either the Artistic License > > > or the > > > GNU General Public License, which may be found in the Perl 5 source > > > kit.
> > > Complete documentation for Perl, including FAQ lists, should be found > > > on > > > this system using "man perl" or "perldoc perl". If you have access to > > > the > > > Internet, point your browser athttp://www.perl.org/, the Perl Home > > > Page.
> > > # apache -v > > > Server version: Apache/1.3.34 (Debian) > > > Server built: Jan 18 2008 19:16:57 > > > ---
> if its working fine from command line .. and not from web .. an smell some
> env issues.. try running the script from command line with user as with
> apache works...
> > bo luck with the suggested changes, have also tried with the same
> > result:
> > ---
> > open(RSH,"rsh dslcore2.syd.pacific.net.au ping 203.12.144.90 |") ||
> > die "Failed: $!\n";
> > while ( <RSH> ) {
> > print;
> > }
> > ---
> > From the command line they do however work, just not when run through
> > Apache (tried apache2 as well)...
> > On Oct 28, 4:24 pm, "Praveen P" <pravee...@gmail.com> wrote:
> > > let me know whether that worked or not
> > > On Tue, Oct 28, 2008 at 9:58 AM, dippa <gerard.sha...@gmail.com> wrote:
> > > > Hi,
> > > > Scratching my head with an issue where my Perl CGI output is being
> > > > truncated, however when running directly from the command line it
> > > > works. I've tried apache2 without any chance.
> > > > Below is a minimal version of a script I'm useing to pull info from a
> > > > Cisco router and display in the web browser:
> > > > ---
> > > > #!/usr/bin/perl -w
> > > > This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
> > > > Copyright 1987-2006, Larry Wall
> > > > Perl may be copied only under the terms of either the Artistic License
> > > > or the
> > > > GNU General Public License, which may be found in the Perl 5 source
> > > > kit.
> > > > Complete documentation for Perl, including FAQ lists, should be found
> > > > on
> > > > this system using "man perl" or "perldoc perl". If you have access to
> > > > the
> > > > Internet, point your browser athttp://www.perl.org/, the Perl Home
> > > > Page.
> > > > # apache -v
> > > > Server version: Apache/1.3.34 (Debian)
> > > > Server built: Jan 18 2008 19:16:57
> > > > ---