Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My Apache process segfaults whenever I call curl_exec() from PHP with an "https://" URL.

If I use http instead of https as the URL transport, it works perfectly, so I know curl and the other curl options are correct.

I can use curl from the command-line on that server using the https version of the URL and it works perfectly, so I know the remote server is responding correctly, the cert isn't expired, etc..

My server is:

Linux 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux

My Apache version is:

Server version: Apache/2.2.14 (Ubuntu)
Server built:   Apr 13 2010 20:21:26

My PHP version is:

PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:03:45) 
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

My PHP curl module info is:

cURL support => enabled
cURL Information => 7.19.7
Age => 3
Features
AsynchDNS => No
Debug => No
GSS-Negotiate => Yes
IDN => Yes
IPv6 => Yes
Largefile => Yes
NTLM => Yes
SPNEGO => No
SSL => Yes
SSPI => No
krb4 => No
libz => Yes
CharConv => No
Protocols => tftp, ftp, telnet, dict, ldap, ldaps, http, file, https, ftps
Host => x86_64-pc-linux-gnu
SSL Version => OpenSSL/0.9.8k
ZLib Version => 1.2.3.3
share|improve this question
    
I'm having the same problem also. Did you manage to find a solution? –  user106357 Jan 8 '12 at 22:07
add comment

1 Answer 1

For me playing with the various PHP curl options available with curl_setopt() has helped me in the past. Try changing CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST to false, for starters.

share|improve this answer
    
I already did that. They are set to false already. –  Jason Cohen Aug 23 '10 at 18:54
    
Have you tried to strace the Apache process with something like "strace -p pidof apache2 -fF -o /tmp/wtf" and then read the resulting /tmp/wtf file for seeing what's going on behind the scenes? –  Janne Pikkarainen Aug 23 '10 at 19:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.