Fix “cURL” is disabled on this server, but is required Error

Discussion in 'Windows Know Base' started by securityhope, Jan 16, 2017.

Tags:
  1. securityhope

    securityhope Administrator Staff Member

    Joined:
    Aug 3, 2016
    Messages:
    1,241
    Likes Received:
    0
    Trophy Points:
    36
    Recently I was trying to install a plugin called WP-AppBox on one of my website. The app allows you to display app details from the Google Play Store or Apps store easily and quickly. When I tried to install and activate the plugin on my WordPress blog, I got an error message showing “cURL” is disabled on this server, but is required. Please enable this feature”.

    [​IMG]

    The mistake I made while installing the WP-App Box plugin is that I didn’t read the requirement section of the app on the WordPress plugin page. The app required Php, WordPress and a server running CURL and mb-eregi. Since I didn’t have the CURL enabled on my server, I was not able to install and activate the plugin. However, after a bit of research, I was able to fix “cURL” is disabled on this server, but is required. Please enable this feature” error on my blog and get the plugin installed. So, if you are facing the same error, follow this step by step guide to know how to fix this error.

    If you have used any extension to export your WordPress backup to Google Drive or DropBox, you may see another similar kind of error reading “Unable to export Google Drive Factory requires cURL extension”. The fix for this error is also same and be fixed by enabling Curl on your server.

    [​IMG]

    What is cURL?

    cURL is a library in PHP created by Daniel Steinberg, and it allows you to make HTTP requests. It is a very handy tool and is used extensively when dealing with APIs and oAuth. So, if you want to use any such plugin, then you may need to enable cURL on your server. You can know more about cURL at PHP cURL.

    Enable cURL Feature on Your Server

    To fix “cURL” is disabled on this server, but is required. Please enable this feature” error, you need to enable the cURL feature. Follow these steps to know how to enable cURL features on your server.

    Requirements:
    • Putty – to log in to your server (download from here)
    • FileZilla – to edit Php.ini file (download from here)
    If you have it already installed, then proceed with the following steps.

    Step 1: Edit php.ini File using FileZilla


    Open FileZilla and login to your server.
    Now locate your Php.ini file. The Php.ini file should be in /etc/php5/apache2/php.ini if you are running Apache. If you are running Nginx, then look in /etc./php5/fpm or similar location.

    [​IMG]

    Once located, right-click on the Php.ini file and select View / Edit from the options.

    [​IMG]

    The php.ini file will open in Notepad. Jump to the last line in php.ini file and add the following code:
    extension=curl.so
    Press Ctrl S to save the file. Now close the notepad and upload the file back to your server.

    Step 2: Install and Enable cURL in PHP


    Now launch Putty and login to your server.
    Once logged in, it’s time to install cURL. Enter the following command to install and enable cURL:

    apt-get install php5-curl

    Press Y, if asked to confirm.
    [​IMG]

    Note:
    If you are not logged in as root, you may need to use sudo to install cURL.

    Sudo apt-get install php5-curl

    Next, restart Apache or Nginx server with the following command.

    To restart apache enter this command:

    service apache2 restart

    To restart Nginx enter this command:

    service nginx restart
    [​IMG]

    That’s all! You have successfully enabled cURL on your server. Now login to your WordPress dashboard and try to install the plugin which was giving the “cURL” is disabled on this server but is required. Please enable this feature” error. You should be able to install the plugin without any problem.
     
    Last edited: Jan 18, 2017

Share This Page

Share