Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
litespeed_wiki:php:pecl-extension:curl [2019/11/27 17:19]
qtwrk created
litespeed_wiki:php:pecl-extension:curl [2023/02/26 02:39]
qtwrk
Line 1: Line 1:
-===== How to Compile cURL PHP Extension =====+====== How to Compile ​the cURL PHP Extension ​======
  
-Sometimes the lsphp-curl package ​is not with latest cURL. +Sometimes the lsphp-curl package ​does not contain the latest cURL. If this is the case, you can manually compile ​the cURL extension with the latest ​version.
- +
-This is guide for how to manually compile cURL extension with latest ​cURL+
  
 {{ :​litespeed_wiki:​php:​pecl-extension:​lsphp-curl1.jpg |}} {{ :​litespeed_wiki:​php:​pecl-extension:​lsphp-curl1.jpg |}}
  
-PHPinfo page reveals ​current ​cURL version ''​7.29.0''​ , certain ​application ​may requires ​a higher version in order to work properly.+The PHPinfo page reveals ​the currently installed ​cURL version ​is ''​7.29.0'', ​but certain ​applications ​may require ​a higher version in order to work properly.
  
-Compile and install latest ​cURL+===== Install the Latest ​cURL =====
  
-<​code>​wget https://curl.haxx.se/download/curl-7.67.0.tar.gz +<​code>​ 
-tar xzvf curl-7.67.0.tar.gz +rpm -ivh http://www.city-fan.org/ftp/contrib/yum-repo/​city-fan.org-release-3-6.rhel7.noarch.rpm 
-cd curl-7.67.0 +yum-config-manager --enable city-fan.org 
-./configure +yum clean all 
-make +yum update 
-make install</​code>​+</​code>​
  
-Now check the cURL. +===== Check the cURL Version ===== 
-<​code>​[root@test ​curl-7.67.0]# curl -V +<​code>​[root@test ​~]# curl -V 
-curl 7.67.(x86_64-pc-linux-gnu) libcurl/7.67.0 OpenSSL/1.0.2k-fips zlib/1.2.7 +curl 7.69.(x86_64-redhat-linux-gnu) libcurl/7.69.1 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: ​2019-11-06 +Release-Date: ​2020-03-11 
-Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp +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 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL UnixSockets</​code>​+Features: AsynchDNS ​GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos ​Largefile libz Metalink ​NTLM NTLM_WB ​PSL SPNEGO ​SSL UnixSockets</​code>​
  
 +===== Download the PHP Source Code =====
  
-Download the PHP source code in example ​we use PHP 7.and compile the extension from source.+In this example, we use PHP 7.and compile the extension from source.
  
-<​code>​wget https://​www.php.net/​distributions/​php-7.3.12.tar.gz+<​code>​wget https://​www.php.net/​distributions/​php-7.4.33.tar.gz
  
-tar xzvf php-7.3.12.tar.gz+tar xzvf php-7.4.33.tar.gz
  
-cd php-7.3.12/ext/curl+cd php-7.4.33/ext/curl
  
-/​usr/​local/​lsws/​lsphp73/bin/phpize+/​usr/​local/​lsws/​lsphp74/bin/phpize
  
-./configure --with-php-config=/​usr/​local/​lsws/​lsphp73/​bin/​php-config --with-curl=/​usr/local/bin+./configure --with-php-config=/​usr/​local/​lsws/​lsphp74/​bin/​php-config --with-curl=/​usr/​bin
  
 make make
Line 44: Line 43:
 </​code>​ </​code>​
  
-Now restart lsphp if necessary , and check phpinfo again. +===== Restart ​and Verify =====
- +
-{{ :​litespeed_wiki:​php:​pecl-extension:​lsphp-curl2.jpg |}}+
  
 +Restart lsphp by command ''​pkill lsphp''​ if necessary, and check the PHPinfo page again.
  
 +{{:​litespeed_wiki:​php:​pecl-extension:​lsphp-curl2.png|}}
  
  • Admin
  • Last modified: 2023/02/26 02:39
  • by qtwrk