There is no cURL in newer versions.

th£ lord

Verified User
Joined
Jan 6, 2007
Messages
47
Hello friends.
All newly installed up-to-date directadmin CBs do not have curl.
There is no current information on this topic in the directadmin help pages.
An example is a server with Ubuntu 22 installed. Directadmin already installs directly with a single command, regardless of your wishes.
Then you can set it via CB or /usr/local/directadmin/custombuild# nano options.conf (they allow it) But as I said, there is no cURL. PHP 8.1 installs itself directly.
Manual installation is not stable when I try to try.
What kind of idea or guidance would you give on this subject?




Apache 2.4.57
DirectAdmin 1.650
MariaDB 10.6.13
pure-ftpd 1.0.51
Php 8.1.19


OS :
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.04
DISTRIB_CODENAME=hirsute
DISTRIB_DESCRIPTION="Ubuntu 21.04"
NAME="Ubuntu"
VERSION="21.04 (Hirsute Hippo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 21.04"
VERSION_ID="21.04"


PHP 8.1.19 (cli) (built: Jun 23 2023 17:30:50) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.19, Copyright (c) Zend Technologies


curl -v
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information

[PHP Modules] -- "Although it is listed in this section, unfortunately it cannot be found or does not work."
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib


nano /usr/local/directadmin/custombuild/versions.txt

imap:2007f:
cwaf_rules:1.233:
litespeed:6.1.2:
apache2.4:2.4.57:
fts-xapian:1.5.5:
xapian-core:1.4.22:
imapsync:2.229:
apr:1.7.4:
apr-util:1.6.3:
modsecurity:2.9.7:
modsecurity3:3.0.9:
modsecurity3_apache:v0.0.9-beta1:
modsecurity3_nginx:v1.0.3:
modsec-sdbm-util:1.0:
owasp3_rules:3.3.4:
nginx:1.25.0:
ngx_cache_purge:2.3:
mod_aclr2:1.0.0:
unit:1.30.0:
openlitespeed:1.7.16:
composer:2.5.7:
wp-cli:2.7.1:
lego:953d5c85145b6a2b9a52f2d919faf23e04a359b3:
lego_arm64:953d5c85145b6a2b9a52f2d919faf23e04a359b3:
dnsproviders:4.5.3:
awstats:7.9:
dovecot:2.3.20:
pigeonhole23:0.5.20:
exim:4.96-58-g4e9ed49f8:
mod_clamav:0.14rc2:
imagick:3.7.0:
phalcon5:5.2.1:
phalcon:4.1.2:
snuffleupagus:0.9.0:
igbinary:3.2.14:
phpredis:5.3.7:
xmlrpc:1.0.0RC3:
psr:1.2.0:
imagemagick:7.1.1-11:
redis:7.0.11:
mysql5.7:5.7.42:
mysql8.0:8.0.33:
mariadb10.3:10.3.39:
mariadb10.4:10.4.29:
mariadb10.5:10.5.20:
mariadb10.6:10.6.13:
jemalloc_versions:3.6.0:
galera_versions:26.4.13:
php53:5.3.29:
php54:5.4.45:
php55:5.5.38:
php56:5.6.40:
php70:7.0.33:
php71:7.1.33:
php72:7.2.34:
php73:7.3.33:
php74:7.4.33:
php80:8.0.28:
php81:8.1.19:
php82:8.2.6:
phpmyadmin5:5.2.1-all-languages:
proftpd:1.3.8:
ncftp:3.2.6:
pureftpd:1.0.51:
roundcubemail:1.6.1:
spamassassin:4.0.0:
spamassassin_rules:4.0.0.r1905950:
squirrelmail:1.4.22:
squirrelmail_svn:1.4.23-20220318_0200:
squirrelmail_locale:1.4.18-20090526:
squirrel_logger:2.3.1-1.2.7:
mod_fcgid:2.3.9:
htscanner:1.0.1-enhanced:
webalizer:2.23-09:
zendopcache:7.0.5:
ioncube_loaders:12.0.4:
suhosin:0.9.38:
mod_hostinglimits:1.0-41:
mod_lsapi:1.1-67:
mod_proctitle:0.1-7:
cl-php-litespeed:7.9:


# PHP Settings
php1_release=8.1
php1_mode=php-fpm
php2_release=no
php2_mode=php-fpm
php3_release=no
php3_mode=php-fpm
php4_release=no
php4_mode=php-fpm
secure_php=yes
php_ini=no
php_timezone=Etc/UTC
php_ini_type=production
x_mail_header=yes

# MySQL Settings
mysql=5.7
mariadb=10.6
mysql_inst=mariadb
mysql_backup=yes
mysql_backup_gzip=no
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no

# WEB Server Settings
unit=no
webserver=apache
http_methods=ALL
litespeed_serialno=trial
modsecurity=no
modsecurity_ruleset=owasp
apache_mpm=auto
mod_ruid2=no
userdir_access=no
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=server2123.isimkayit.com
redirect_host_https=no

# WEB Applications Settings
phpmyadmin=yes
phpmyadmin_public=yes
squirrelmail=no
roundcube=yes
webapps_inbox_prefix=no

# ClamAV-related Settings
clamav=no
clamav_exim=yes
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=no
suhosin_php_uploadscan=no

# Mail Settings
exim=yes
eximconf=yes
blockcracking=no
easy_spam_fighter=no
spamd=no
sa_update=daily
dovecot=yes
dovecot_conf=yes
mail_compress=no
pigeonhole=yes

# FTP Settings
ftpd=pureftpd

# Statistics Settings
awstats=no
webalizer=yes

# CustomBuild Settings
bold=yes
clean=yes
clean_old_tarballs=yes
clean_old_webapps=yes

# Cronjob Settings
cron=yes
cron_frequency=daily
email=[email protected]
notifications=no
updates=no
webapps_updates=no

# CloudLinux Settings
cloudlinux=no
cagefs=no

# Advanced Settings
csf=yes
ssl_configuration=intermediate
redis=no


/usr/local/directadmin/custombuild# ./build curl
+-----------------------------------------------------------+
| DirectAdmin WebServices Installer |
| Written by Martynas Bendorius and DirectAdmin |
| Version: 2.0.0 |
+-----------------------------------------------------------+
| To build everything run: |
| ./build all |
| |
| NOTE: Command all will compile everything as it is set |
| in the options.conf file, please take a look at |
| "./build options"! |
 
So how can I adapt it? Can you show me the way?
Normally after the upgrade of DA it would be automatically removed from custombuild and installed from OS automatically if I'm not mistaken.

Check if you have curl installed momentarily, via SSH as root:
curl --version

If it gives you a curl version, then it's installed. For Centos 7 it's momentarily version 7.29.0.
Almalinux 8 has version 7.61.1.
Both are good for most things.

You can update (if an update is present) via your package manager, either yum/dnf or apt depending on the distro used.

Edit: just remembered you're on Ubuntu. So should the version command give no output for you, then you should be able to install it like this, in SSH as root.
sudo apt install curl
 
Normally after the upgrade of DA it would be automatically removed from custombuild and installed from OS automatically if I'm not mistaken.

Check if you have curl installed momentarily, via SSH as root:
curl --version

If it gives you a curl version, then it's installed. For Centos 7 it's momentarily version 7.29.0.
Almalinux 8 has version 7.61.1.
Both are good for most things.

You can update (if an update is present) via your package manager, either yum/dnf or apt depending on the distro used.

Edit: just remembered you're on Ubuntu. So should the version command give no output for you, then you should be able to install it like this, in SSH as root.
sudo apt install curl

Thnks,

Looks like cURL is installed on the server. Well, we used to define php.ini version from directadmin.
So can we say this? There is no need to make any settings via directadmin. isn't it?

curl --version
curl 7.74.0 (x86_64-pc-linux-gnu) libcurl/7.74.0 OpenSSL/1.1.1j zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh/0.9.5/openssl/zlib nghttp2/1.43.0 librtmp/2.3
Release-Date: 2020-12-09
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
 
I know this is old but I've hit a snag
The PHP cURL extension must be enabled on your server.
Code:
curl is already the newest version (7.64.0-4+deb10u8).
# which curl
/usr/bin/curl
The configure.phpNN files have
Code:
--with-curl
Umm?
 
It's not that old yet. :)
I think the first one is the curl binary for OS wide curl support and the second example is for the build of the php-curl extension.
Just guessing, so I could be wrong.
What I'm asking is why isn't a PHP compile seeing the binary........... or is an empty --with-curl looking for it in another path?

Edit: Curl is compiled
Code:
~# php -m | grep curl
curl
??‍♂️

Unless there's a bug in the script I'm using.
 
Last edited:
What I'm asking is why isn't a PHP compile seeing the binary
As far as I understood, because they are not the same. So I went searching....

This is what I found on the internet:
cURL is a command-line tool and library for transferring data using various protocols, including HTTP, HTTPS, FTP, and more. The PHP cURL library is a wrapper around the cURL tool that allows PHP developers to make use of its functionalities within their scripts easily.
So it seems the php curl extension is used as a wrapper.
And in another place:
What is the difference between cURL and PHP cURL?

cURL stands for "Client for URLs" and it is a command-line tool and library for transferring data using various network protocols, including HTTP, HTTPS, FTP, and many others. In PHP, cURL is provided in the form of a library that allows you to make HTTP requests and handle the responses programmatically.

The bold is in the result I found, so I didn't put that in there. :)

So maybe it's in your script.

The first result I found was from here:
and this was also somebody which didn't get curl to work correctly in his script. Maybe you can find some info there for the script you're using.
 
Turns out that as I proxy through Cloudflare, the script that calls itself to check if curl exists fails with a 403! Disabling the proxy route fixes it.

Why? I have no clue.... Not only Mod Security can break scripts, but Cloudflare can too... Scary....
 
I still can't figure this out.
Even though cURL is installed on the server.

php -m | grep curl
PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so/curl (/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so/curl: cannot open shared object file: No such file or directory), /usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so/curl.so (/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so/curl.so (/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so/curl.so: cannot open shared object file: No such file or directory), /usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so/curl.so.so (/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so/curl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
curl
 
Dear My Frends,
I noticed that this line is incorrect. It says curl.so.so twice. I couldn't fix this.

/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so/curl.so.so
7.4 php.ini

extension=curl

curl.cainfo =/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so

extension=curl.so


/usr/local/php74/lib/php.conf.d/10-directadmin.ini

extension_dir=/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902\curl.so
zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_7.4.so

I couldn't find my mistake. I ask for help from my dear friends who have ideas.
Thnks.
 
extension DIR - just path to DIR - not to exact file
extension_dir=/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902
 
extension DIR - just path to DIR - not to exact file
extension_dir=/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902
Thanks to you, the problem is solved, thank you my friend.

As you said, I edited the path in the directadmin.ini file.
Then I edited the following fields in the php.ini file and it no longer gives the warning. Thanks.

incorrect
extension=curl
False
;extension=curl

incorrect
curl.cainfo =/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/curl.so
False
;curl.cainfo =/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/curl.so

incorrect
extension=curl.so
False
;extension=curl.so

Now it's as it should be. Thanks again.

custombuild]# ./build update
directadmin current v1.659 1239cfae7d6c151785559607143bb30aef61d374 is already latest
 
Last edited:
Back
Top