How to update PHP CURL version on CentOS 7 using AAPanel + OpenLiteSpeed + PHP 7.4?
1. Run the following commands as a root user in SSH,
rpm -ivh http://www.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel7.noarch.rpm
yum-config-manager --enable city-fan.org
yum clean all
yum update
2. I had to open OLS WebAdmin http://serverIP:7080
3. Run following command in SSH to set username and password for OLS WebAdmin:
/usr/local/lsws/admin/misc/admpass.sh
4. Login at: OLS WebAdmin http://serverIP:7080 with username and password set in step 3.
5. Go to Tools > Compile PHP > PHP 7.4 > Click on Next Steps and it will ask you to run a command in SSH, run that command, it will take 10 mins to compile PHP 7.4 with latest curl version.
6. Now use this command in SSH: pkill lsphp
7. By this time, your PHP Curl version should have been updated to the latest one.
8. Create t.php and paste this code, save it and access the URL: websitename.com/t.php
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
9. Search with CTRL+F on page and enter CURL, it will show the latest version there.