How to enable cURL extension in PHP?

Note: This guide is for those who have FULL access to the server, when system configuration can be changed. If you are using shared hosting, please contact your hosting provider.

Step 1: Check whether cURL extension is installed/enabled or not

Within the Joomla administration area, you can view “php.ini” configurations by navigating to Site > System Information and selecting the tab “PHP Information”.

Checking PHP Info right from Joomla

At this point, search for the keyword “curl” and if it does not appear on the page, the extension might not be installed/enabled. Please proceed to the next step.

P.S: In this step, you are also able to locate where the “php.ini” configuration file is. Search for Loaded Configuration File” and you might end up with something like:

php.ini file location

Step 2: Ensure cURL extension for PHP is installed

On Windows, people often use WAMP (Windows, Apache, MySQL, PHP) bundles for local development. Fortunately, cURL extension is pre-installed with those bundles, so you can proceed to Step 3.

On Linux, it depends on which Linux distro the server is installed with, so you might need to run the appropriate command.

For example, with Ubuntu/Debian server, you need to run this command:

sudo apt-get install php5-curl

After that, restart the Apache server:

sudo /etc/init.d/apache2 restart

After the Apache server has restarted, the extension should be enabled by default. You might use the method at Step 1 to check, and if not, please proceed to the next step.

Step 3: Enable cURL extension in “php.ini” file

Load the “php.ini” file located in Step 1 into your favorite text editor (if you are using Windows, we suggest Notepad++), then search for “php_curl”. At this point, you need to uncomment the line by removing the semicolon at the beginning of the line, as below.

Editing php.ini file to enable curl

After saving the file, restart the Apache server. Double check the Joomla “PHP Information” section again to see if the extension is enabled.

cURL extension for PHP is enabled

If you see something like that, then congratulations, you have successfully enabled PHP cURL!

Rated 5 stars based on 2 votes
Rate this blog entry:
Recent posts
Start building your business website with Joomla 2...
Update JSN ImageShow to version 4.4.1 and enjoy ne...
Leave a comment

Related Posts

We all know that Joomla is a fantastic CMS for building professional websites. The JED (Joomla Extension Directory) is full of com...
05 June 2013
Page loading times on your website are important for a number of reasons. Not only can slow pages frustrate visitors and cost yo...
11 May 2013
One day, my friend said to me "Hey buddy, I need to build a business website with Joomla but I don't know what exactly to do, help...
17 October 2012
The freelance marketplace is the great place where the companies can outsource the project for an affordable cost. It gives good o...
07 October 2012
No need to worry about updating JSN ImageShow to the latest version anymore. Dear customers, from version 4.0.0, you can see a ...
05 September 2012