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

    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

    KFSys
    Site Moderator
    Site Moderator badge
    September 23, 2022

    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

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    Become a contributor for community

    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

    DigitalOcean Documentation

    Full documentation for every DigitalOcean product.

    Resources for startups and SMBs

    The Wave has everything you need to know about building a business, from raising funding to marketing your product.

    Get our newsletter

    Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

    New accounts only. By submitting your email you agree to our Privacy Policy

    The developer cloud

    Scale up as you grow — whether you're running one virtual machine or ten thousand.

    Get started for free

    Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

    *This promotional offer applies to new accounts only.