Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: WWW::Mechanize - Could not connect to a server

by chargrill (Parson)
on Mar 20, 2007 at 03:20 UTC ( #605628=note: print w/ replies, xml ) Need Help??


in reply to WWW::Mechanize - Could not connect to a server

Are you behind a proxy?

If you are, WWW::Mechanize respects your $ENV{HTTP_PROXY} environment variable - you could try setting that in your program to whatever your browser is set to.

Update: Just checked the Mech FAQ, How to use mech through a proxy might be of interest, too



--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)


Comment on Re: WWW::Mechanize - Could not connect to a server
Select or Download Code
Re^2: WWW::Mechanize - Could not connect to a server
by jesuashok (Curate) on Mar 20, 2007 at 03:41 UTC
    I Don't know how to check whether my system uses Proxy, through Perl. because when I tried to
    print $ENV{HTTP_PROXY} , "\n";
    Prints nothing.
    But I could see a IP address set in Internet Explorer. Can I use that Ip as follows in my perl code ?
    $ENV{HTTP_PROXY} = "xx.xx.xx.xx:<port_number>";
    I am Sorry, if this questions annoy you.


    hmmm ....let me think what did I said

      It's been a while since I've tried to mech from inside a proxy. (Yes, I've just verbized the short name for WWW::Mechanize).

      Give that a shot, or try following the other suggestions frm the FAQ, for which you've already got the link above.

      If that fails (and I don't see how, since now you've confirmed you're behind a proxy) there are some other troubleshooting steps you can try near the end of the Mech FAQ, including checking $mech->status after every attempt to get something.



      --chargrill
      s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-11-28 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (196 votes), past polls