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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
43 + 9 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Apr 19 21:01:30 2024 UTC