php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38686 Aborted when fetching https
Submitted: 2006-09-01 23:54 UTC Modified: 2006-09-03 09:19 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: php at cakkie dot be Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5.1.6 OS: Debian
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at cakkie dot be
New email:
PHP Version: OS:

 

 [2006-09-01 23:54 UTC] php at cakkie dot be
Description:
------------
When trying to fetch a page using https, it shows following error when calling curl_exec:

*** glibc detected *** free(): invalid pointer: 0x40158640 ***

This only happens when calling the PHP file from the commandline, and only when trying to fetch pages on https. 
When running the file through Apache 2.2.2, it works without a problem.
When fetching from http instead of https, it works without a problem.

Reproduce code:
---------------
<?php
        $url = "https://someserver/somefile.ext";
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_exec($ch);
        curl_close($ch);
?>


Expected result:
----------------
running from commandline:#> php test.php
This is the contents of https://someserver/somefile.ext

running from browser:#> http://myserver/test.php
This is the contents of https://someserver/somefile.ext



Actual result:
--------------
running from commandline:#> php test.php
*** glibc detected *** free(): invalid pointer: 0x40158640 ***
Aborted

running from browser:#> http://myserver/test.php
This is the contents of https://someserver/somefile.ext


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-01 23:59 UTC] php at cakkie dot be
Forgot to mention:
I'm using libcurl3-dev_7.15.5-1

The commandline version of curl is able to fetch from https without a problem.
 [2006-09-02 06:35 UTC] tony2001@php.net
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


 [2006-09-02 11:50 UTC] php at cakkie dot be
I've tried the latest snapshop (php5.2-200609020830), but the error is still there.
 [2006-09-02 16:13 UTC] mike@php.net
Can you please generate a backtrace?

Thanks
 [2006-09-02 21:40 UTC] php at cakkie dot be
(gdb) bt
#0  0x40404947 in raise () from /lib/tls/libc.so.6
#1  0x404060c9 in abort () from /lib/tls/libc.so.6
#2  0x40439fda in __fsetlocking () from /lib/tls/libc.so.6
#3  0x4044189f in mallopt () from /lib/tls/libc.so.6
#4  0x40441942 in free () from /lib/tls/libc.so.6
#5  0x0833cbfb in yaSSL::SSL_CTX::~SSL_CTX ()
#6  0x0832e6ad in SSL_CTX_free ()
#7  0x400fe7c9 in Curl_ossl_close (conn=0x87c8348) at ssluse.c:724
#8  0x4010f2df in Curl_ssl_close (conn=0x0) at sslgen.c:381
#9  0x400f91a4 in Curl_disconnect (conn=0x87c8348) at url.c:1634
#10 0x400fc91d in Curl_connect (data=0x0, in_connect=0xbfffd6d8, asyncp=0xbfffd69a "", protocol_done=0x0) at url.c:4011
#11 0x40106c82 in Curl_connect_host (data=0x87bfde8, conn=0xbfffd6d8) at transfer.c:2133
#12 0x40106e5b in Curl_perform (data=0x87bfde8) at transfer.c:2222
#13 0x40107641 in curl_easy_perform (curl=0x87bfde8) at easy.c:470
#14 0x080d01a7 in zif_curl_exec (ht=1, return_value=0x4052b984, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
    at /usr/src/php5.2-200609020830/ext/curl/interface.c:1647
#15 0x082bea45 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffd880)
    at /usr/src/php5.2-200609020830/Zend/zend_vm_execute.h:200
#16 0x082be298 in execute (op_array=0x4052adb0) at /usr/src/php5.2-200609020830/Zend/zend_vm_execute.h:92
#17 0x082a581e in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/php5.2-200609020830/Zend/zend.c:1095
#18 0x08269ce6 in php_execute_script (primary_file=0xbffffc90) at /usr/src/php5.2-200609020830/main/main.c:1759
#19 0x0830b39f in main (argc=2, argv=0xbffffd54) at /usr/src/php5.2-200609020830/sapi/cli/php_cli.c:1102
(gdb)
 [2006-09-03 09:19 UTC] mike@php.net
This is a YaSSL (cURL/OpenSSL compatibility) bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 05:01:29 2024 UTC