curl-library
Re: HTTP2 support in libcurl3 for Ubuntu 14.04 and PHP7
Date: Thu, 15 Sep 2016 14:29:02 -0400
Thanks Ray. This process worked perfectly. I haven’t used gpg before and need to learn more about how to set it up. For now, I skipped the gpg verification (it’s only a dev/test server).
One last thing to add is how to reconfigure PHP to use the new version of lib curl within both the CLI and web server environments. I made a “hack” of my php7 config for apache by replacing the existing libcurl.so.4.4.0 with the one produced via your process and will try the same for the PHP7 CLI config. Not sure what the “formal” procedure should be (create a package?)
Thanks again…Scott
> On Sep 13, 2016, at 6:35 PM, Ray Satiro <raysatiro_at_yahoo.com> wrote:
>
> On 9/9/2016 11:59 AM, Scott Moser wrote:
>> I need a version of libcurl3 that will enable me to initiate HTTP2 sessions with Apple’s APNS service from within my PHP7 app running on Ubuntu 14.04.
>
> On 9/10/2016 9:39 AM, Scott Moser wrote:
>> Do you know of anyone providing a libcurl build with HTTP2 enabled for a more recent version of Ubuntu? I’ve searched and can’t seem to find one. Maybe my search skills are lacking:-)
>>
>> I’ve tried compiling my own version (limits experience doing this) and have run into issues re: missing pkg-config for nghttp2, instructions include python bindings which I don’t need, etc.
>
> I am not aware of a package that has it. I build curl manually in Ubuntu 14 and 16 LTS with nghttp2 and install it in /usr/local. My notes are at https://gist.github.com/jay/d88d74b6807544387a6c you can copy and paste the sections. I don't have an automated script for it, though I probably should. I do openssl then nghttp2 then curl. Note if you haven't yet set up gpg you'll need to use a keyserver eg gpg --keyserver keys.gnupg.net
>
> cat << EOF > a.c
> #include <curl/curl.h>
> int main() {
> printf("%s\n", curl_version());
> return 0;
> }
> EOF
> gcc a.c `curl-config --libs --cflags`
> ./a.out
> # Should show your just installed version
> libcurl/7.50.2 OpenSSL/1.0.2h zlib/1.2.8 libidn/1.32 nghttp2/1.14.1 librtmp/2.3
>
> In 16.04 LTS you can then just do sudo apt-get install php php-curl and you'll also have to put this in your php
> curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
>
> In 14.04 LTS I'm not running PHP7 but I'd guess you have to rebuild and link to the right libcurl? I'm not sure. Let me know what you end up doing.
>
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-09-15