Score:0

Why is the cURL extension needed?

py flag

PHP requirements contains the following text.

The PHP cURL extension is required for automated testing in Drupal 9 and higher, as well as Aggregator and some contributed modules.
Many Linux distributions and development stacks will have it enabled by default, but if your system doesn't either enable it in php.ini (typically on Windows) or install it using your package manager (typically on Linux).

I don't program in PHP but I do use Bash where I use curl to download things. What does it download in Drupal? For example, what does Aggregator or the Drupal testing system do with it?

ru flag
This is a bit like asking *what does curl download in bash?* - whatever the user needs on his site
amos_a avatar
py flag
@Hudri I use Drupal 13 years and I don't think I have ever thought that the core or a theme or a module would download data without my consent. I think it's a problem if one feature does it.
cn flag
Any time you install a module with translations they're downloaded; any time your site requests module update information it needs to be downloaded; if you use Solr/Elastic ditto; many other contrib modules make API calls which need to be downloaded; there are probably plenty of other examples. There's no legal/ethical basis that I'm aware of that would mean explicit consent should be sought for these operations, so that's probably not the right attribute to use to make an assumption about whether a request will be made from your site (whether those operations specifically use cURL or not)
apaderno avatar
us flag
cURL is not only used to download files, but also to use the REST, JSON, or OAuth API exposed by a site. For example, if a module is authenticating users on an external site that uses OAuth, the module is not downloading a file.
apaderno avatar
us flag
@amos_a Actually, when you are checking from a Drupal site if there are updates, you are automatically giving to Drupal the permission to download the list of the release for each module you installed.
Score:3
de flag

Drupal is a framework. It uses Guzzle under the hood. Guzzle is an HTTP client that can make requests. Guzzle uses cURL under the hood. Any module may use the HTTP client to make requests. Because Drupal is a framework, it provides tools for modules to use.

I am not sure if core explicitly uses it for any given processes, but the tool is there to be used.

If you are wondering if it is safe to disable, due to every Drupal instance being a unique build, that can't be answered in a blanket statement, so the best thing to do is disable cURL, then test to see if everything still works on your server.

apaderno avatar
us flag
It should be used when Drupal core checks for updates by looking at the data returned from `https://updates.drupal.org/release-history/` (for example, https://updates.drupal.org/release-history/gmagick/7.x).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.