php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48390 CURLOPT_PROTOCOLS not supported
Submitted: 2009-05-25 21:51 UTC Modified: 2009-05-26 04:14 UTC
From: andy at networkmail dot eu Assigned:
Status: Closed Package: cURL related
PHP Version: 5.2.9 OS: Solaris 10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: andy at networkmail dot eu
New email:
PHP Version: OS:

 

 [2009-05-25 21:51 UTC] andy at networkmail dot eu
Description:
------------
Running PHP 5.2.9 linked against cURL 7.19.4.  

According to the documentation, the option "CURLOPT_PROTOCOLS" is available as of cURL 7.19.4, but PHP is throwing a notice: "Use of undefined constant CURLOPT_PROTOCOLS - assumed 'CURLOPT_PROTOCOLS'"

Also all the "CURLPROTO_*" constants are not available:

Use of undefined constant CURLPROTO_HTTPS - assumed 'CURLPROTO_HTTPS'

Reproduce code:
---------------
<?php

$client = curl_init();
curl_setopt($client, CURLOPT_POSTFIELDS, $xml);

var_dump(curl_version());

?>

Expected result:
----------------
** NOTE: No notices **

array(9) {
  ["version_number"]=>
  int(463620)
  ["age"]=>
  int(3)
  ["features"]=>
  int(541)
  ["ssl_version_number"]=>
  int(0)
  ["version"]=>
  string(6) "7.19.4"
  ["host"]=>
  string(19) "i386-pc-solaris2.10"
  ["ssl_version"]=>
  string(14) "OpenSSL/0.9.8j"
  ["libz_version"]=>
  string(5) "1.2.3"
  ["protocols"]=>
  array(9) {
    [0]=>
    string(4) "tftp"
    [1]=>
    string(3) "ftp"
    [2]=>
    string(6) "telnet"
    [3]=>
    string(4) "dict"
    [4]=>
    string(4) "ldap"
    [5]=>
    string(4) "http"
    [6]=>
    string(4) "file"
    [7]=>
    string(5) "https"
    [8]=>
    string(4) "ftps"
  }
}

Actual result:
--------------
<br />
<b>Notice</b>:  Use of undefined constant CURLOPT_PROTOCOLS - assumed 'CURLOPT_PROTOCOLS' in ...<br />
<br />
<b>Notice</b>:  Use of undefined constant CURLPROTO_HTTPS - assumed 'CURLPROTO_HTTPS' in ...<br />

array(9) {
  ["version_number"]=>
  int(463620)
  ["age"]=>
  int(3)
  ["features"]=>
  int(541)
  ["ssl_version_number"]=>
  int(0)
  ["version"]=>
  string(6) "7.19.4"
  ["host"]=>
  string(19) "i386-pc-solaris2.10"
  ["ssl_version"]=>
  string(14) "OpenSSL/0.9.8j"
  ["libz_version"]=>
  string(5) "1.2.3"
  ["protocols"]=>
  array(9) {
    [0]=>
    string(4) "tftp"
    [1]=>
    string(3) "ftp"
    [2]=>
    string(6) "telnet"
    [3]=>
    string(4) "dict"
    [4]=>
    string(4) "ldap"
    [5]=>
    string(4) "http"
    [6]=>
    string(4) "file"
    [7]=>
    string(5) "https"
    [8]=>
    string(4) "ftps"
  }
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-26 04:14 UTC] jani@php.net
This is added in CVS already. Will be in next release.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 15:01:27 2025 UTC