|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-26 04:14 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
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" } }