php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69633 curl_setopt(CURLOPT_SSL_VERIFYPEER, false) requires other parameters
Submitted: 2015-05-13 22:31 UTC Modified: 2016-05-01 04:22 UTC
From: kedar at rfspot dot com Assigned:
Status: No Feedback Package: cURL related
PHP Version: 5.5.24 OS: Ubuntu 14.04
Private report: No CVE-ID: None
 [2015-05-13 22:31 UTC] kedar at rfspot dot com
Description:
------------
---
From manual page: http://www.php.net/function.curl-setopt
---

When CURLOPT_SSL_VERIFYPEER is set to false, CURLOPT_SSL_VERIFYHOST must be set explicity (true or false) in order to receive a result. Otherwise, the curl function will fail silently and return no result. 

Test script:
---------------
$ch = curl_init("https://test.com/api/test");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // required to be set to true or false in order to receive a result with CURLOPT_SSL_VERIFYPEER=false
$result = curl_exec($ch);
curl_close($ch);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-24 04:07 UTC] pierrick@php.net
-Status: Open +Status: Feedback
 [2016-04-24 04:07 UTC] pierrick@php.net
I can't reproduce the problem. Can you still produce it ? If yes what version of curl are you using ?

php -r 'print_r(curl_version()['version']);'
 [2016-05-01 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC