Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

segmentation fault

by llppcc (Initiate)
on Jul 10, 2006 at 01:15 UTC ( #560047=perlquestion: print w/ replies, xml ) Need Help??
llppcc has asked for the wisdom of the Perl Monks concerning the following question:

Helo, I am trying to connect to httpS using www::mechanize , but every time get a segmentation fault.
I am Using RHEL 4 , openssl version is 0.9.8b .
problem Detail:
When I try to mechanize->get() any http URL it works , but whenever I put in an httpS Url it gives segmentation fault .
Tried another CPAN module to access web , same thing is happening.
Is it a fault with openssl ? Can you help me tracing the fault line .
Thank you
Here is basic code i m trying to run ----------
#!/usr/bin/perl use WWW::Mechanize; my $mech = WWW::Mechanize->new( autocheck => 1); my $url2 = "https://login.live.com/login.srf?id=2&svc=mail&cbid=24325& +msppjph=1&tw=0&fs=1&fsa=1&fsat=1296000&lc=1033&_lang=EN&bk=1633438"; $mech->get($url2); print $mech->content; print $mech->forms;

Edited by planetscape - removed "<br>" from code

( keep:1 edit:9 reap:0 )

Comment on segmentation fault
Select or Download Code
Re: segmentation fault
by McDarren (Abbot) on Jul 10, 2006 at 01:53 UTC
    Well, running your code as is, I get the following error:
    Error GETing https://login.live.com/login.srf?id=2&svc=mail&cbid=24325 +&msppjph=1&tw=0&fs=1&fsa=1&fsat=1296000&lc=1033&_lang=EN&bk=1633438: +Protocol scheme 'https' is not supported (Crypt::SSLeay not installed +) at foo.pl line 5

    After installing Crypt::SSLeay it appears to work as I expect you want it to.

    Regards,
    Darren

      Thanx Darren
      I've linked the Crypt::SSLeay with older version of OpenSSL(0.9.7) and it is working fine :)
Re: segmentation fault
by ioannis (Vicar) on Jul 10, 2006 at 03:00 UTC
    In view of the earlier suggestions, I expect that your UserAgent will be working soon. If not, my first attempt when troubleshooting https connections is to check if the server is properly configured:

    $ openssl s_client -connect localhost:443 -state -debug GET / HTTP/1.0

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (13)
As of 2015-07-06 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls