php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74050 missing constants definition CURLPIPE_MULTIPLEX, CURL_HTTP_VERSION_2...etc.
Submitted: 2017-02-06 06:12 UTC Modified: 2017-02-26 04:22 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: david dot feng at xflying dot com Assigned:
Status: No Feedback Package: cURL related
PHP Version: 7.1.1 OS: Ubuntu trusty
Private report: No CVE-ID: None
 [2017-02-06 06:12 UTC] david dot feng at xflying dot com
Description:
------------
I've installed php7.1-fpm, php7.1-curl on my Unubtu trusty with Nginx 1.11.9.
I'm working on a HTTP2 related project and called 

curl_multi_setopt($mh, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);

it reports that CURLPIPE_MULTIPLEX is undefined.

and I need to use CURL_HTTP_VERSION_2_0 instead of CURL_HTTP_VERSION_2 which is different from the manual's described here:
http://php.net/manual/en/curl.constants.php

Test script:
---------------
curl_multi_setopt($mh, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-06 06:44 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2017-02-06 06:44 UTC] requinix@php.net
Those constants are available in PHP but they require libcurl >= 7.43. Ubuntu Trusty only comes with libcurl 7.35.
 [2017-02-16 10:26 UTC] thibault dot vlacich at gmail dot com
I have the exact same problem.

Notice: Use of undefined constant CURLPIPE_MULTIPLEX - assumed 'CURLPIPE_MULTIPLEX'
Notice: Use of undefined constant CURL_HTTP_VERSION_2 - assumed 'CURL_HTTP_VERSION_2'

I have curl 7.46.0. Here's interesting outputs from phpinfo():

PHP Version 7.0.15-1+0~20170120094752.20+jessie~1.gbpe03972

curl

cURL support	enabled
cURL Information	7.46.0
HTTP2	Yes
SSL Version	OpenSSL/1.0.2k
 [2017-02-16 11:31 UTC] requinix@php.net
@thibault: They are also available for 7.0.15. PHP (or just the curl extension) must be *compiled* with libcurl >= 7.43 - it is not enough to have that version available at runtime. Since deb.sury.org does not provide its own libcurl, its php7.0-curl would be compiled against what is available in Jessie: 7.38.
 [2017-02-26 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 12:01:31 2024 UTC