No output from script on OSX 10.3/Apache 1.3.29/mod_perl-1.26

2004-04-25 Thread Garry Heaton
Using the default installation of Mac OSX 10.3/Apache 1.3.29/mod_perl-1.26/Perl 5.8.1RC1, the following script: #!/usr/bin/perl -w use strict; use CGI qw(:standard); print header(), start_html(), ''; for (sort keys(%ENV)) { print "$_ = $ENV{$_}\n"; } print '', end_html(); exit(0); ... wor

Re: No output from script on OSX 10.3/Apache 1.3.29/mod_perl-1.26

2004-04-25 Thread Stas Bekman
Garry Heaton wrote: Using the default installation of Mac OSX 10.3/Apache 1.3.29/mod_perl-1.26/Perl 5.8.1RC1, the following script: #!/usr/bin/perl -w use strict; use CGI qw(:standard); print header(), start_html(), ''; for (sort keys(%ENV)) { print "$_ = $ENV{$_}\n"; } print '', end_html(); e

Re: No output from script on OSX 10.3/Apache 1.3.29/mod_perl-1.26

2004-04-25 Thread Garry Heaton
Stas Bekman wrote: > That's not what your server returns, that's a fake page that your > browser gives to you. You need to test with a command line tool, like > LWP's GET, lynx, links or whatever is available on your OS. > > I remember someone asked that question before. Something about STDOUT >

Re: No output from script on OSX 10.3/Apache 1.3.29/mod_perl-1.26

2004-04-25 Thread Garry Heaton
Sorry, Stas, I jumped the gun editing your original. Just tested: #!/usr/bin/perl -w use strict; use diagnostics; my $r = shift; $r->print("Content-type: text/plain\n\n"); $r->print("It works"); ./test.pl produced: Can't call method "print" on an undefined value at ./test.pl line 6 (#1) (F) Yo

Re: No output from script on OSX 10.3/Apache 1.3.29/mod_perl-1.26

2004-04-25 Thread Perrin Harkins
On Sun, 2004-04-25 at 21:09, Garry Heaton wrote: > It works but can you explain what value $r receives from 'shift' when no > argument is supplied via @ARGV? When you run a script under Apache::Registry, it gets passed an Apache request object automatically. That's what you are grabbing with that

Re: No output from script on OSX 10.3/Apache 1.3.29/mod_perl-1.26

2004-04-25 Thread Stas Bekman
Garry Heaton wrote: Stas Bekman wrote: That's not what your server returns, that's a fake page that your browser gives to you. You need to test with a command line tool, like LWP's GET, lynx, links or whatever is available on your OS. I remember someone asked that question before. Something about

Re: No output from script on OSX 10.3/Apache 1.3.29/mod_perl-1.26

2004-04-26 Thread Tom Schindl
You can not run this script in the shell because it expects a Apache::Request-Object which is passed by Apache::Registry to you. Why you are getting Apache::Request is because Apache::Registry is wrapping your "CGI"-Code in an subroutine. The code run inside mod_perl looks something like the fo