If i use the CURLOPT_TCP_FASTOPEN
option in my code , then i get the following error.
Use of undefined constant CURLOPT_TCP_FASTOPEN - assumed 'CURLOPT_TCP_FASTOPEN'
The CURLOPT_TCP_FASTOPEN is a supported option in php 7.4.5 interface .
php -v
PHP 7.4.5 (cli) (built: Apr 14 2020 12:54:33) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies
curl -V
curl 7.70.0 (x86_64-redhat-linux-gnu) libcurl/7.70.0 NSS/3.44 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.9.0 nghttp2/1.31.1
Release-Date: 2020-04-29
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz Metalink NTLM NTLM_WB PSL SPNEGO SSL UnixSockets
What am i doing wrong here ?
Edit 1:
Here are additional info corresponding to YouriKoeman's overview
Kernel version : 3.10.0-1062.12.1.el7.x86_64
OS : unix (Centos 7.x)
curl --tcp-fastopen -L http://www.google.com
return the following error:
curl: (55) Send failure: Operation not supported for curl --tcp-fastopen -L http://www.google.com
php -r 'print_r(curl_version()['version']);'
– SympathinPHP Warning: Use of undefined constant version - assumed 'version' (this will throw an Error in a future version of PHP) in Command line code on line 1
with your command – EthicsPHP Warning: Use of undefined constant version - assumed 'version' (this will throw an Error in a future version of PHP) in Command line code on line 1 7.70.0
– Ethics