2

My site is a wordpress platform, hosted with AWS EC2. I have installed a plugin and it said "You'll need to contact your hosting provider and ask them to enable CURL for PHP.".

I have checked on my server using "service apache2 status" and "service httpd status" and it said "unrecognised service". While "service nginx status" shows "* nginx is running"

Anyone know can I enable CURL for PHP? I only found this step https://www.digitalocean.com/community/questions/curl-is-not-installed-in-your-php-installation but I think that is for Apache.

killadoop
  • 21
  • 1
  • 2

1 Answers1

5

It's not related with apache or nginx. You need to install the php libcurl package

On deb systems you could do it with the following command:

sudo apt-get install php-curl
jakub wrona
  • 2,212
  • 17
  • 17
  • Ah okay. So referring to the URL I provided above, apache and nginx will only have the difference in command to restart (step 2&5), correct? Basically I can just follow the rest of the steps and use restart command for nginx? If so, which command can I user to restart? – killadoop Oct 01 '16 at 13:06
  • You wrote you have an nginx, so it would be either: # service nginx restart or # service nginx reload. You can find the difference here: http://stackoverflow.com/questions/13525465/when-to-restart-and-not-reload-nginx – jakub wrona Oct 01 '16 at 13:10
  • With sudo in front of service nginx restart or service nginx restart, right? – killadoop Oct 02 '16 at 04:57
  • Shouldn't that be `sudo apt-get install php5-curl` ? – Phill Healey Apr 17 '17 at 09:05
  • @killadoop You'll need elevated (sudo) permissions to do a service restart. – Phill Healey Apr 17 '17 at 09:07