ID:               38393
 User updated by:  asubstitute at gmail dot com
 Reported By:      asubstitute at gmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         cURL related
 Operating System: RHEL4
 PHP Version:      5.1.4
 New Comment:

Look in my inital post, see I tried the snapshot code too. (RIght
before I submitted this)

The procedural code above works only for HTTP urls.

HTTPS cause a segfault (though both protocols make the OOP version
die)

I can run curl from the command line, and it works fine. Indicating it
is unlikely to be a libcurl issue.
Curl info from phpinfo. libcurl/7.15.5 OpenSSL/0.9.7a zlib/1.2.3
libidn/0.5.6

Server: lighttpd 1.4.11

./configure' '--enable-fastcgi' '--enable-discard-path'
'--enable-force-redirect' '--enable-exif' '--enable-ftp' '--with-dom'
'--enable-sockets' '--enable-memory-limit' '--enable-mbstring'
'--with-gettext' '--with-mime-magic' '--with-iconv' '--with-gd=/usr'
'--with-ttf' '--with-freetype-dir=/usr/X11R6' '--enable-gd-native-ttf'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--with-xpm-dir=/usr/X11R6/lib' '--with-mysql=/usr/lib' '--with-zlib'
'--with-curl' '--with-curlwrappers' '--with-expat-dir=/usr'
'--with-xsl' '--with-bz2' '--with-openssl' '--enable-debug'


Previous Comments:
------------------------------------------------------------------------

[2006-08-09 08:37:01] [EMAIL PROTECTED]

What was your configure line?

------------------------------------------------------------------------

[2006-08-09 07:48:48] [EMAIL PROTECTED]

Even looks like an OpenSSL problem.

------------------------------------------------------------------------

[2006-08-09 07:48:10] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce either.

------------------------------------------------------------------------

[2006-08-09 06:28:46] asubstitute at gmail dot com

==backtrace==

(gdb) bt
#0  0x0056a008 in SSL_SESSION_hash () from /lib/libssl.so.4
#1  0x004311c4 in lh_free () from /lib/libcrypto.so.4
#2  0x00431333 in lh_delete () from /lib/libcrypto.so.4
#3  0x0056e131 in SSL_CTX_get_timeout () from /lib/libssl.so.4
#4  0x004312ae in lh_retrieve () from /lib/libcrypto.so.4
#5  0x0056e1e7 in SSL_CTX_flush_sessions () from /lib/libssl.so.4
#6  0x0056a192 in SSL_CTX_free () from /lib/libssl.so.4
#7  0x002a6fbd in Curl_ossl_close (conn=0x98d2f98) at ssluse.c:724
#8  0x002b6489 in Curl_ssl_close (conn=0x98d2f98) at sslgen.c:381
#9  0x002a1281 in Curl_disconnect (conn=0x98d2f98) at url.c:1634
#10 0x002a26f7 in ConnectionKillOne (data=0x98d5d70) at url.c:1835
#11 0x002a2743 in Curl_close (data=0x98d5d70) at url.c:203
#12 0x002af8f9 in curl_easy_cleanup (curl=0x98d5d70) at easy.c:485
#13 0x080dc1b5 in _php_curl_close (rsrc=0x98cce44) at
/home/rixth/php-5.1.4/ext/curl/interface.c:1736
#14 0x08291da1 in list_entry_destructor (ptr=0x98cce44) at
/home/rixth/php-5.1.4/Zend/zend_list.c:184
#15 0x0828f484 in zend_hash_del_key_or_index (ht=0x86ab080, arKey=0x0,
nKeyLength=0, h=1, flag=1)
    at /home/rixth/php-5.1.4/Zend/zend_hash.c:492
#16 0x08291b3c in _zend_list_delete (id=1) at
/home/rixth/php-5.1.4/Zend/zend_list.c:58
#17 0x080dc192 in zif_curl_close (ht=1, return_value=0x98cc81c,
return_value_ptr=0x0, this_ptr=0x0,
    return_value_used=0) at
/home/rixth/php-5.1.4/ext/curl/interface.c:1721
#18 0x082a22d1 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff2c2d0)
    at /home/rixth/php-5.1.4/Zend/zend_vm_execute.h:200
#19 0x082a1c3d in execute (op_array=0x98ce404) at
/home/rixth/php-5.1.4/Zend/zend_vm_execute.h:92
#20 0x082a1e91 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff2c490)
    at /home/rixth/php-5.1.4/Zend/zend_vm_execute.h:234
#21 0x082a1c3d in execute (op_array=0x98c83c4) at
/home/rixth/php-5.1.4/Zend/zend_vm_execute.h:92
#22 0x08287b76 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
    at /home/rixth/php-5.1.4/Zend/zend.c:1109
#23 0x0824e838 in php_execute_script (primary_file=0xbff30be0) at
/home/rixth/php-5.1.4/main/main.c:1732
#24 0x0830fa44 in main (argc=2, argv=0xbff30cb4) at
/home/rixth/php-5.1.4/sapi/cgi/cgi_main.c:1608
(gdb)


If I use procedural code like this, it works fine.

$curl = curl_init();
$curl_setopt($curl, CURLOPT_URL,
"http://www.google.com/explanation.html";);              
$responseData = curl_exec($curl);
if (curl_errno($curl)) {
        $responseData = null;
        $responseError = curl_error($curl);
}
else {
        curl_close($curl);
}

------------------------------------------------------------------------

[2006-08-09 05:56:50] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I could not reproduce this crash on debian i386, debian
amd64, or SLED 10 i386. Seeking backtrace.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/38393

-- 
Edit this bug report at http://bugs.php.net/?id=38393&edit=1

Reply via email to