Call to undefined function curl_init() [duplicate]

北城余情 提交于 2019-11-30 14:06:32

问题


Possible Duplicate:
curl_init() function not working

I am using PHP for accessing the Foursquare API. I have set up everything for the authentication with Foursquare. But as soon as I click on the "Allow" button, my callback.php gives me the following error:

Fatal error: Call to undefined function curl_init() in C:\wamp\www\EpiFoursquare.php on line 119

Call Stack

Time    Memory  Function                          Location
0.0007  372592  {main}( )                         ..\callback.php:0
0.0039  571896  EpiFoursquare->getAccessToken( )  ..\callback.php:17
0.0040  572928  EpiFoursquare->request( )         ..\EpiFoursquare.php:31

Where does this error come from? I cannot find the origin. Please help me out.


回答1:


You need to initialize the cURL extension: http://php.net/manual/en/curl.installation.php




回答2:


  1. remove ; from extension=php_curl.dll in php.ini ;
  2. ensure that ssleay32.dll and libeay32.dll are in Windows/system32 ;
  3. copy php_curl.dll into Windows\System32 as well.

This worked for me!



来源:https://stackoverflow.com/questions/10226983/call-to-undefined-function-curl-init

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!