This is an old revision of the document!


Sometimes the lsphp-curl package is not with latest cURL.

This is guide for how to manually compile cURL extension with latest cURL

PHPinfo page reveals current cURL version 7.29.0 , certain application may requires a higher version in order to work properly.

Compile and install latest cURL

wget https://curl.haxx.se/download/curl-7.67.0.tar.gz
tar xzvf curl-7.67.0.tar.gz
cd curl-7.67.0
./configure
make
make install

Now check the cURL.

[root@test curl-7.67.0]# curl -V
curl 7.67.0 (x86_64-pc-linux-gnu) libcurl/7.67.0 OpenSSL/1.0.2k-fips zlib/1.2.7
Release-Date: 2019-11-06
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL UnixSockets

Download the PHP source code , in example we use PHP 7.3 and compile the extension from source.

wget https://www.php.net/distributions/php-7.3.12.tar.gz

tar xzvf php-7.3.12.tar.gz

cd php-7.3.12/ext/curl

/usr/local/lsws/lsphp73/bin/phpize

./configure --with-php-config=/usr/local/lsws/lsphp73/bin/php-config --with-curl=/usr/local/bin

make

make install

Now restart lsphp if necessary , and check phpinfo again.

  • Admin
  • Last modified: 2019/11/27 17:19
  • by qtwrk