Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Welcome to the Monastery
 
PerlMonks  

Re^2: Abbreviated output when attempting to do whois via script

by jerrygarciuh (Curate)
on Aug 01, 2004 at 17:04 UTC ( #379100=note: print w/ replies, xml ) Need Help??


in reply to Re: Abbreviated output when attempting to do whois via script
in thread Abbreviated output when attempting to do whois via script

Thanks for the reply podmaster,

So now I am baffled. This does indeed work:

perl -le'print `whois friendsofjabu.com`'

So what am I doing wrong here? Why does this get only the abbreviated output?

#!/usr/local/bin/perl -w use strict; use CGI::Carp qw/fatalsToBrowser /; use CGI qw/:standard/; use CGI::Pretty qw/ :html3 /; my $dom = "friendsofjabu.com"; my $q = CGI->new(); print $q->header,start_html, '<pre>'; print my $output = `whois $dom` . '</pre>';

BTW when I use this code to lookup a domain which is NOT in the redemption period, I have just found that it works fine.

Any thoughts?


TIA
jg
_____________________________________________________
"The man who grasps principles can successfully select his own methods.
The man who tries methods, ignoring principles, is sure to have trouble.
~ Ralph Waldo Emerson


Comment on Re^2: Abbreviated output when attempting to do whois via script
Select or Download Code
Re^3: Abbreviated output when attempting to do whois via script
by simonm (Vicar) on Aug 01, 2004 at 21:47 UTC
    Perhaps your shell environment has a different PATH or an alias that adds other command-line options, which your CGI script lacks because it's running in the web server's environment. Try doing "which whois" in the shell and then use the full path in the CGI script.
      simonm,

      Thanks for the reply. I have the full path in now (/usr/bin/whois) but sadly get the same results.

      Any other suggestions folks?


      TIA
      jg
      _____________________________________________________
      "Transport of the mails, transport of the human voice, transport of flickering pictures - in this century, as in others, our highest accomplishments still have the single aim of bringing people together."
      Wind, Sand, and Stars
      Antoine-Marie-Roger de Saint-Exupery

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://379100]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-04-19 21:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (483 votes), past polls