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

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 = " +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 )

Replies are listed 'Best First'.
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 +&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 line 5

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


      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 (Monsignor) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://560047]
Approved by chargrill
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2018-03-20 20:18 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (259 votes). Check out past polls.