I use Ubuntu 14.04.3 LTS on my server and run php5-fpm. I need to send a HTTP2 request via curl in php.
I used this tutorial to install curl/libcurl:
https://blog.cloudflare.com/tools-for-debugging-testing-and-using-http-2/
Somehow in terminal if I run 'curl –http2 https://….' everything works fine.
But if I try it in PHP nothing works. Also the php-info doesn't show the http2 support.
Maybe someone can help, thanks!
Best Answer
Your PHP is most likely linked to the system default
libcurl.so
, which does not support HTTP/2.You need to find a PHP package for your system that is linked to use
libcurl.so
that supports HTTP/2.