cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Segmentation Faults with Curl & PHP

From: Deepesh Malviya <deep0mal_at_gmail.com>
Date: Sat, 4 Sep 2010 13:24:13 +0530

Might be you need to reinstall openssl. Will worth a try.

On Fri, Sep 3, 2010 at 7:14 AM, Joe <sickbeatz_at_gmail.com> wrote:

> Curl with PHP works fine, except for when I use SSL! I've tried
> different versions --- even the latest version of PHP with the latest
> version of Curl. When ever I make a https request, I get a
> segmentation fault.
>
> On Thu, Sep 2, 2010 at 4:49 PM, Joe <sickbeatz_at_gmail.com> wrote:
> > Hey, I'm trying to use facebook connect & twitter oauth... I get
> > segmentation faults with both scripts
> >
> > Using facebook connect (http://github.com/facebook/php-sdk/) here is
> > the backtrace:
> >
> > [Switching to Thread -1208330560 (LWP 21310)]
> > 0x00a8e071 in _int_free () from /lib/tls/libc.so.6
> > (gdb) bt
> > #0 0x00a8e071 in _int_free () from /lib/tls/libc.so.6
> > #1 0x00a8e93a in free () from /lib/tls/libc.so.6
> > #2 0x00245d22 in CRYPTO_free () from /lib/libcrypto.so.4
> > #3 0x002ad26a in ASN1_STRING_free () from /lib/libcrypto.so.4
> > #4 0x002a5f31 in ASN1_primitive_free () from /lib/libcrypto.so.4
> > #5 0x002a5f8a in ASN1_primitive_free () from /lib/libcrypto.so.4
> > #6 0x002a601d in ASN1_primitive_free () from /lib/libcrypto.so.4
> > #7 0x002a625d in ASN1_template_free () from /lib/libcrypto.so.4
> > #8 0x002a6183 in ASN1_primitive_free () from /lib/libcrypto.so.4
> > #9 0x002a625d in ASN1_template_free () from /lib/libcrypto.so.4
> > #10 0x002a6183 in ASN1_primitive_free () from /lib/libcrypto.so.4
> > #11 0x002a6293 in ASN1_item_free () from /lib/libcrypto.so.4
> > #12 0x002a13d1 in X509_free () from /lib/libcrypto.so.4
> > #13 0x0028c00b in sk_pop_free () from /lib/libcrypto.so.4
> > #14 0x001f1767 in ssl_sess_cert_free () from /lib/libssl.so.4
> > #15 0x001f24d9 in SSL_SESSION_free () from /lib/libssl.so.4
> > #16 0x001f027b in SSL_free () from /lib/libssl.so.4
> > #17 0x003d4634 in Curl_SSL_Close () from /usr/lib/libcurl.so.3
> > #18 0x003cdbb2 in Curl_disconnect () from /usr/lib/libcurl.so.3
> > #19 0x003cef74 in Curl_setopt () from /usr/lib/libcurl.so.3
> > #20 0x003cefad in Curl_close () from /usr/lib/libcurl.so.3
> > #21 0x003dd18b in curl_easy_cleanup () from /usr/lib/libcurl.so.3
> > #22 0x080c0011 in _php_curl_close (rsrc=0xb7bd2bd0)
> > at /root/updates/php-5.2.0/ext/curl/interface.c:1901
> > #23 0x082b4b55 in list_entry_destructor (ptr=0xb7bd2bd0)
> > at /root/updates/php-5.2.0/Zend/zend_list.c:184
> > #24 0x082b29ed in zend_hash_del_key_or_index (ht=0x8649aa0, arKey=0x0,
> > nKeyLength=0, h=5, flag=1) at
> /root/updates/php-5.2.0/Zend/zend_hash.c:492
> > #25 0x082b48f0 in _zend_list_delete (id=5)
> > at /root/updates/php-5.2.0/Zend/zend_list.c:58
> > #26 0x080bffee in zif_curl_close (ht=1, return_value=0xb7bd82b8,
> > return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
> > at /root/updates/php-5.2.0/ext/curl/interface.c:1886
> > #27 0x082c3a6e in zend_do_fcall_common_helper_SPEC
> (execute_data=0xbfedf7b0)
> > at /root/updates/php-5.2.0/Zend/zend_vm_execute.h:200
> > #28 0x0050c0c8 in get_module ()
> > from /usr/local/Zend/lib/Optimizer-3.2.2/php-5.2.x/ZendOptimizer.so
> > #29 0xbfedf7b0 in ?? ()
> > #30 0xb7beac1c in ?? ()
> > #31 0x0000000b in ?? ()
> > #32 0x61f4c210 in ?? ()
> > #33 0xb7bd2d20 in ?? ()
> > #34 0xbfedf7b0 in ?? ()
> > #35 0x00000000 in ?? ()
> >
> > Using twitter oauth (http://github.com/abraham/twitteroauth) here is
> > the backtrace:
> >
> > (gdb) bt
> > #0 0x00174032 in SSL_SESSION_hash () from /lib/libssl.so.4
> > #1 0x0028c394 in lh_free () from /lib/libcrypto.so.4
> > #2 0x0028c503 in lh_delete () from /lib/libcrypto.so.4
> > #3 0x00178175 in SSL_CTX_get_timeout () from /lib/libssl.so.4
> > #4 0x0028c47e in lh_retrieve () from /lib/libcrypto.so.4
> > #5 0x0017822b in SSL_CTX_flush_sessions () from /lib/libssl.so.4
> > #6 0x001741c0 in SSL_CTX_free () from /lib/libssl.so.4
> > #7 0x003d4650 in Curl_SSL_Close () from /usr/lib/libcurl.so.3
> > #8 0x003cdbb2 in Curl_disconnect () from /usr/lib/libcurl.so.3
> > #9 0x003cf4b8 in Curl_done () from /usr/lib/libcurl.so.3
> > #10 0x003dcc4c in Curl_perform () from /usr/lib/libcurl.so.3
> > #11 0x003dd102 in curl_easy_perform () from /usr/lib/libcurl.so.3
> > #12 0x080bf6d2 in zif_curl_exec (ht=1, return_value=0xb7bbc478,
> > return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
> > at /root/updates/php-5.2.0/ext/curl/interface.c:1656
> > #13 0x082c3a6e in zend_do_fcall_common_helper_SPEC
> (execute_data=0xbff4e8e0)
> > at /root/updates/php-5.2.0/Zend/zend_vm_execute.h:200
> > #14 0x006cd0c8 in get_module ()
> > from /usr/local/Zend/lib/Optimizer-3.2.2/php-5.2.x/ZendOptimizer.so
> > #15 0xbff4e8e0 in ?? ()
> > #16 0xb7bc563c in ?? ()
> > #17 0x0000000a in ?? ()
> > #18 0x9687589f in ?? ()
> > #19 0xb7baa0f0 in ?? ()
> > #20 0xbff4e8e0 in ?? ()
> > #21 0x00000000 in ?? ()
> >
> > Here is some version info:
> >
> > $ php --version
> > PHP 5.2.0 (cli) (built: Jan 28 2007 05:31:49)
> > Copyright (c) 1997-2006 The PHP Group
> > Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
> > with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by
> > Zend Technologies
> > with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend
> Technologies
> >
> >
> > $ curl --version
> > curl 7.12.1 (i686-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a
> > zlib/1.2.1.2 libidn/0.5.6
> > Protocols: ftp gopher telnet dict ldap http file https ftps
> > Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
> >
> >
> > Does anybody have any ideas of what maybe going wrong here? Thanks!
> >
> > --
> > Joe Burnett
> >
>
>
>
> --
> Joe Burnett
> 250-826-5220
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>

-- 
_Deepesh

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2010-09-04