0

I have this code $ch = curl_init(); and I have an error of Call to undefined function curl_init() I know that I need to enable/install the curl that's why my question is can I install the curl support in php.ini in wordpress? Or I still need to install php to install it there?

Jennifer
  • 1,291
  • 1
  • 11
  • 16

1 Answers1

0

You can try this (if on debian/ubuntu):

$ sudo apt-get install php5-curl
$ sudo /etc/init.d/apache2 restart

Otherwise, read the install notes for php curl support. It states:

"To use PHP's cURL support you must also compile PHP --with-curl[=DIR] where DIR is the location of the directory containing the lib and include directories."

johnjg12
  • 1,083
  • 8
  • 17