Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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`'

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 = ""; 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?

"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

Replies are listed 'Best First'.
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.

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

      Any other suggestions folks?

      "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?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2016-10-25 18:17 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (326 votes). Check out past polls.