Question

cURL is not working in the LAMP droplet

  • Posted on February 4, 2022
  • dexetteAsked by Annette

I created a DigitalOcean LAMP droplet right out of the box - and cURL is not working. I have edited my php.ini file by removing the semicolon before the curl extension, but php is still not recognizing it.

This is incredibly irritating as it should work - right out of the box, yes? I have to have cURL in order to use the CMS I want. I have been trying for days to get this working to no avail.

Either I find a solution quickly or I will just have to find another host that has something that will work. I tried creating my own stack and that didn’t work either. I am about to lose my mind… UGH!

Any help would be appreciated, Thanks!


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

This comment has been deleted

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

I can confirm cURL is working on the LAMP Droplet. I’ve experienced such issues before where the CMS was not using the PHP version I wanted and thus having issues with some extensions.

Additionally, you can always try and install cURL from your terminal using the following line:

Ubuntu

apt install php-curl

CentOS

  1. yum install php-curl

I uncommented the cURL extension in the php.ini file located in the cli directory and now I get this error message:

PHP Warning: PHP Startup: Unable to load dynamic library ‘curl’ (tried: /usr/lib/php/20200930/curl (/usr/lib/php/20200930/curl: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/curl.so (/usr/lib/php/20200930/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0