0

why I always get Uncaught Error: Call to undefined function curl_init(). I have set extension:php_curl in php.ini and install php-curl too. but not working. . everyone help me?

5
  • your php and apache version? Commented Apr 12, 2018 at 5:16
  • I think this is duplicate of stackoverflow.com/questions/6382539/… Commented Apr 12, 2018 at 5:16
  • What PHP version and platform are you using? To make sure it is properly installed, use: extension_loaded('curl') Commented Apr 12, 2018 at 5:18
  • yes I know but I have followed it. and still keep the error. @Priya Commented Apr 12, 2018 at 5:26
  • I use php version 7.0 Commented Apr 12, 2018 at 5:27

1 Answer 1

9

Install curl

sudo apt-get install php-curl 

if you are using php 7

sudo apt-get install php7.0-curl

and restart server

sudo service apache2 restart
Sign up to request clarification or add additional context in comments.

1 Comment

thank you it work on me. when I used sudo apt-get install php7.0-curl.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.