本文翻译自:Call to undefined function curl_init().? [duplicate]
When i am going to implement Authorize.net payment gateway. 当我要实现Authorize.net付款网关时。 However, I got this error: 但是,我收到此错误:
Call to undefined function curl_init() 调用未定义的函数curl_init()
Please let me know what is wrong in it. 请让我知道其中有什么问题。
#1楼
参考:https://stackoom.com/question/QmOB/调用未定义的函数curl-init-重复
#2楼
You have to enable curl with php. 您必须使用php启用curl。
Here is the instructions for same 这是相同的说明
#3楼
The CURL extension ext/curl
is not installed or enabled in your PHP installation. 您的PHP安装中未安装或启用CURL扩展名ext/curl
。 Check the manual for information on how to install or enable CURL on your system. 查看手册以获取有关如何在系统上安装或启用CURL的信息。
#4楼
If you're on Windows: 如果您使用的是Windows:
Go to your php.ini file and remove the ;
转到您的php.ini文件并删除;
mark from the beginning of the following line: 从以下行的开头进行标记:
;extension=php_curl.dll
After you have saved the file you must restart your HTTP server software (eg Apache) before this can take effect. 保存文件后, 必须重新启动HTTP服务器软件(例如Apache),然后才能生效。
For Ubuntu 13.0 and above, simply use the debundled package. 对于Ubuntu 13.0及更高版本,只需使用已解包的软件包。 In a terminal type the following to install it and do not forgot to restart server. 在终端中,键入以下内容进行安装,并且不要忘记重新启动服务器。
sudo apt-get install php-curl
Or if you're using the old PHP5 或者,如果您使用的是旧的PHP5
sudo apt-get install php5-curl
or 要么
sudo apt-get install php5.6-curl