cURL is a PHP extension that is used for creating 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, if this is not your case, this article is for you.
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 the type of your web server and operating system.
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:
with the next one:
Ubuntu/Debian + Apache
Run the following command in your console
sudo apt-get install php5-curl