Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by jerrygarciuh (Curate)
on Aug 01, 2004 at 17:04 UTC ( [id://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

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.
      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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://379100]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-18 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found