I have an apache server and want to add curl.
I have done
sudo apt-get update
sudo apt-get install curl (successfully completed)
sudo apt-get install php-curl (successfully completed)
sudo service apache2 restart
And I get this:
PHP Fatal error: Uncaught Error: Call to undefined function curl_init()
Am I missing a step? This post (How do I install the ext-curl extension with PHP 7?) seem to indicate that it should be that easy
For info,
php --version
PHP 8.1.13 (cli) (built: Nov 26 2022 14:07:36) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.13, Copyright (c) Zend Technologies with Zend OPcache v8.1.13, Copyright (c), by Zend Technologies
curl -V
curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3 Release-Date: 2020-01-08 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets