|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
(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)