I am running a VPS with Debian 10, Apache 2.4.38, PHP 7.3.4-2, MariaDB 10.3.15 and curl 7.64.0.
On one of the hosted, older websites I am running a script that uses curl_init();
which fails with the following error:
Error: Uncaught Error: Call to undefined function curl_init() in /var/www/example.com/public_html/_function.php:218
Stack trace:
#0
On older versions of Debian / Ubuntu, the solution was to add the ppa:ondrej/php
and then install php7.1-curl
or later.
When I try to add the repository, I get the following error:
Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa
You can get more information about the packages at https://deb.sury.org
BUGS&FEATURES: This PPA now has a issue tracker:
https://deb.sury.org/#bug-reporting
CAVEATS:
1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
2. If you are using apache2, you are advised to add ppa:ondrej/apache2
3. If you are using nginx, you are advise to add ppa:ondrej/nginx-mainline
or ppa:ondrej/nginx
PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/
WARNING: add-apt-repository is broken with non-UTF-8 locales, see
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:
# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox '/tmp/tmp013x8d0y/pubring.gpg' created
gpg: /tmp/tmp013x8d0y/trustdb.gpg: trustdb created
gpg: key 4F4EA0AAE5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: no valid OpenPGP data found.
I would appreciate your feedback how to get the key problem fixed and if this is the recommended way to get curl_init();
working in the described setting.