cURL is a PHP extension used to create connections to different types of servers. In particular, we are using cURL to connect to the X-Cart App Store and install add-ons from there. Usually, hosting teams compile PHP with cURL enabled, and everything works fine. However, this article is for you if this is not your case.
There are several possible cases when cURL is not configured properly with your PHP, and we will explain how to deal with these situations.
cURL Does Not Work on Your Web Server
Usually, you can solve this case by contacting your hosting team and asking them to compile PHP with cURL. However, some hosting providers allow to enable cURL via Control Panel, so you may want to check this option before contacting the hosting team. If you have a dedicated server and manage extensions yourself, learn the section below for more instructions.
cURL Does Not Work on Your Local Machine
In this case, the solution will be different depending on your web server and operating system type.
Windows + XAMPP
Find three files on your PC:
C:\Program Files\xampp\apache\bin\php.ini C:\Program Files\xampp\php\php.ini C:\Program Files\xampp\php\php4\php.ini
Edit each of them and replace there the following piece of code:
;extension=php_curl.dll
with the next one:
extension=php_curl.dll
Restart Apache.
Ubuntu/Debian + Apache
Run the following command in your console
sudo apt-get install php5-curl
Restart Apache.
Related pages: