오늘 아침부터 Curl을 사용하여 스크립트 중 하나에 문제가 있습니다. 오류는 "example.com:443에 연결되어있는 알 수없는 SSL 프로토콜 오류입니다."입니다.PHP "SSL 연결에 알 수없는 SSL 프로토콜 오류가 있습니다."SSL V3을 강제 적용했습니다
SSL 버전 3을 강제 적용하려고했지만 결과가 같습니다. 여기
curl_setopt($curl, CURLOPT_SSLVERSION,3);
내 코드입니다 :
$url = "https://example.com/abc/abc";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_ENCODING, 'UTF-8');
curl_setopt($curl, CURLOPT_SSLVERSION,3);
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json2send);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
$part4 = curl_exec($curl);
내가 명령으로 시도하고 동일합니다 : 나는 지금 ... 나 어떻게 해야할지 모르겠어
curl -I -v --sslv3 https://example.com/abc/abc
* About to connect() to example.com port 443 (#0)
* Trying X.X.X.X...
* connected
* Connected to example.com (X.X.X.X) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to example.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to example.com:443
이 버그를 더 나은 방법으로 추적하기 위해
컬 버전
curl 7.26.0 (x86_64-pc-linux-gnu) libcurl/7.26.0 OpenSSL/1.0.1e zlib/1.2.7 libidn/1.25 libssh2/1.4.2 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
Features: Debug GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
PHP 버전
PHP 5.4.36-0+deb7u3 (cli) (built: Jan 9 2015 08:07:06)
은 OpenSSL 버전
OpenSSL 1.0.1e 11 Feb 2013
나는 컬 7.36 & 7.37로 너무 많은 서버에 노력하고 동일한 문제가 있습니다. 나는
당신이
무슨 PHP 버전과 컬 버전이 있습니까
의 출력을 게시하시기 바랍니다? – Blaatpraat
나는 (미안) 게시물을 편집했습니다. – Alex