Sendy installation missing curl and simplexml

You followed instructions for Sendy installation but you got an error message similar to this:

Message: Uncaught Error: Call to undefined function curl_init() in /var/www/html/sendy/includes/functions.php(1) : eval()'d code:399 Stack trace: #0 /var/www/html/sendy/_install.php(1) : eval()'d code(12): file_get_contents_curl() #1 /var/www/html/sendy/_install.php(1): eval() #2 {main} thrown
File: /var/www/html/sendy/includes/functions.php(1) : eval()'d code
Line: 399

This means the PHP curl module is missing and visiting the compatibility check URL (http://your_sendy_installation_url/_compatibility.php?i=1) confirms it.

Sendy compatibility test, 2 errors

I am using a DigitalOcean Ubuntu droplet with LAMP stack but without cPanel so I have to use SSH and some Linux commands to fix the problem. The same process can be used on any server with SSH access.

First, we note that the PHP version on the server is 8.0

And then search for the correct package

$ sudo apt update
$ sudo apt-cache search php | grep curl

We get a list of available extensions

Available php-curl versions

For PHP 8.0 version we will need to install the cURL Extension for PHP using the following command:

$ sudo apt install php8.0-curl

If your server has a different version of PHP, install the same version of cURL extension.

Restart Apache web server

$ sudo service apache2 restart
One fixed, one to go

Repeat the same process for simplexml

$ sudo apt-cache search php | grep xml
Available simple xml packages
$ sudo apt install php8.0-xml

Restart Apache again

$ sudo service apache2 restart
After restart, the problem is fixed, compatibility score 10/10

Leave a Comment