output in shell, but not in browser? 
Author Message
 output in shell, but not in browser?

I seem to be having a strange problem with outputing to a browser.

When running the attached script via Telnet, it outputs the information
from the program on the screen.  However, when I run the same script
from a browser, the output is just blank.

But what's really strange is that when I replace "socklink" with "whois"
and "variable1 variable2" with a domain name, it runs the whois command
and successfully outputs to the browser.

Does any one know why this would occur and what I need to do to correct it?

Thanks,

Dan

begin 666 socklink.cgi



M;VYT96YT+51Y<&4Z=&5X="]H=&UL7&Y<;B(I.PT*#0IP<FEN=" \/$5/33L-


`
end



Tue, 13 Feb 2001 03:00:00 GMT  
 output in shell, but not in browser?

Quote:

> When running the attached script via Telnet, it outputs the information
> from the program on the screen.  

So, the problem isn't in Perl.

Quote:
> However, when I run the same script
> from a browser, the output is just blank.

Maybe the problem is in your browser. Or it could be in your server, your
use of the CGI interface, or in one of the other things you didn't
mention. In any case, the docs, FAQs, and newsgroups about those things
should be helpful.

Also, hen you're having trouble with a CGI program in Perl, you should
first look at the please-don't-be-offended-by-the-name Idiot's Guide to
solving such problems. It's available on CPAN.

   http://www.perl.com/CPAN/
   http://www.perl.org/CPAN/
   http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
   http://www.perl.org/CPAN/doc/manual/html/pod/

Hope this helps!

--
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



Wed, 14 Feb 2001 03:00:00 GMT  
 output in shell, but not in browser?
: When running the attached script via Telnet, it outputs the information
: from the program on the screen.  However, when I run the same script
: from a browser, the output is just blank.

Browsers need to be sent a content-type.  Try
print "Content-type: text/plain\n\n";

That might help.

--
           Dan Nguyen            | There is only one happiness in

http://www.cse.msu.edu/~nguyend7 |                   -George Sand



Wed, 14 Feb 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP! Perl/CGI returns output in shell, but not from browser

2. runs okay in shell, not in browser

3. Scripts work from shell but not browser

4. New-2-Perl: Script output to Browser not working

5. Sending output only to browser, not to user...

6. perl CGI output not shown in browser

7. CGI outputs to DOS not browser

8. not able to output to browser

9. Browser saves (not shows) Perl Output

10. looking for simple browser - cgi compatible -not lynx -not netscape

11. output shows up in piped output file, but not on homepage

 

 
Powered by phpBB® Forum Software