Help error Php cURL

hi I installed owncloud on raspberry debian jessie, followed by a guide to the installation and so far everything ok but just launch from my pc my address I 192.168.1.100/owncloud I get this error

 The PHP cURL module is not installed.

 Ask your server administrator to install the form.
 PHP modules have been installed, but are still listed as missing?

 Ask the administrator to restart the web server.

There you have it. Install the module and restart the webserver.

How To install php curl and which version is required?

Search for php curl on Ubuntu using apt-cache search php curl
You will see output similar to this:

php7.2-curl - CURL module for PHP
php-http-request2 - Provides an easy way to perform HTTP requests
php-curl - CURL module for PHP [default]
php5.6-curl - CURL module for PHP
php7.0-curl - CURL module for PHP
php7.1-curl - CURL module for PHP
php7.3-curl - CURL module for PHP
php7.4-curl - CURL module for PHP

If you look at the main package you’ll see the following:

root@ubuntu1804:~# apt-cache show php-curl
Package: php-curl
Source: php-defaults (71+ubuntu18.04.1+deb.sury.org+1)
Priority: optional
Section: php
Installed-Size: 12
Maintainer: Debian PHP Maintainers <team+pkg-php@tracker.debian.org>
Architecture: all
Version: 2:7.4+71+ubuntu18.04.1+deb.sury.org+1
Depends: php-common, php7.4-curl
Filename: pool/main/p/php-defaults/php-curl_7.4+71+ubuntu18.04.1+deb.sury.org+1_all.deb
Size: 6116
MD5sum: 83b484e77f9c760f6cfc53ab855f6979
SHA1: 60baafcc041e71bffdff84e8fc4a6fb318ba940b
SHA256: b55ea675862f1b4eb7027e310d65cc409365e8a0ee8bae2f394abef414b7f3d9
Description-en: CURL module for PHP [default]
 This package provides a CURL module for PHP.
 .
 PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
 open source general-purpose scripting language that is especially suited
 for web development and can be embedded into HTML.
 .
 This package is a dependency package, which depends on Debian's default
 PHP version (currently 7.4).
Description-md5: 8a0b537324d58c7476c9afd57f37d01b

Package: php-curl
Architecture: all
Version: 1:7.2+60ubuntu1
Priority: optional
Section: php
Source: php-defaults (60ubuntu1)
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 12
Depends: php-common, php7.2-curl
Filename: pool/main/p/php-defaults/php-curl_7.2+60ubuntu1_all.deb
Size: 1996
MD5sum: 1368d69e201b7a2ab8b67b91fa0bfe23
SHA1: 760c741d8b09b0500ec0d34f3d1dc61201cd94ec
SHA256: 799a08d8be5c0d15469c4b7698e560e7d9ed06cb6387559f8b82004a64dc02c8
Description-en: CURL module for PHP [default]
 This package provides a CURL module for PHP.
 .
 PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
 open source general-purpose scripting language that is especially suited
 for web development and can be embedded into HTML.
 .
 This package is a dependency package, which depends on Ubuntu's default
 PHP version (currently 7.2).
Description-md5: 8ab5b2f6b0eb3192a292656773062ec4
Supported: 5y

There are two package versions for php-curl from two different repositories. All they do is add a dependency to the correct version of the module for each PHP version.

PHP 7.2 is default in 18.04 and PHP 7.4 is new default for PPA installations. Recommended for ownCloud currently is PHP 7.3.

So make sure you have PHP 7.3 installed and enabled for Apache & CLI and then install the module and enable it.

1 Like

I have now installed php7.2 7.3 and by accident 7.4 How can I enable 7.3 for owncloud?
I have Error like this:
PHP-Modul zip nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Modul dom nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Modul XMLWriter nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Modul XMLReader nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Modul intl nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Modul libxml nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Modul mb multibyte nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Modul GD nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Modul SimpleXML nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Modul cURL nicht installiert.

Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.
PHP-Module wurden installiert, werden aber als noch fehlend gelistet?

sudo ls /etc/apache2/mods-enabled/

access_compat.load autoindex.conf mime.load rewrite.load
alias.conf autoindex.load mpm_prefork.conf setenvif.conf
alias.load deflate.conf mpm_prefork.load setenvif.load
auth_basic.load deflate.load negotiation.conf socache_shmcb.load
authn_core.load dir.conf negotiation.load ssl.conf
authn_file.load dir.load php7.2.conf ssl.load
authz_core.load env.load php7.2.load status.conf
authz_host.load filter.load reqtimeout.conf status.load
authz_user.load mime.conf reqtimeout.load

How can I change the php7.2 modules to 7.3?

It doesn’t matter, if you have muliple php versions on ubuntu 18.04 like on my system.
I had 7.2 installed first then installed PHP7.3 including the modules for owncloud.
By forgetting the number on a module it installed PHP7.4 because it is default now.

Solved the problem for me after many hours of internet research:

sudo update-alternatives --config php
choose number of php7.3

sudo a2dismod php7.2

sudo a2enmod php7.3

sudo systemctl restart apache2

Start owncloud and it worked

3 Likes