请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

发送不出验证码,报错undefined curl_init()

misswell@ubuntu:~/Code/thinkphp_5.1.0_rc/server$ php http_server.php 

PHP Fatal error:  Uncaught Error: Call to undefined function Aliyun\Core\Http\curl_init() in /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/Http/HttpHelper.php:13

Stack trace:

#0 /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/DefaultAcsClient.php(60): Aliyun\Core\Http\HttpHelper::curl('http://dysmsapi...', 'POST', Array, Array)

#1 /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/DefaultAcsClient.php(22): Aliyun\Core\DefaultAcsClient->doActionImpl(Object(Aliyun\Api\Sms\Request\V20170525\SendSmsRequest), Object(Aliyun\Core\Auth\ShaHmac1Signer), Object(Aliyun\Core\Auth\Credential), true, 3)

#2 /home/misswell/Code/thinkphp_5.1.0_rc/application/common/lib/ali/Sms.php(102): Aliyun\Core\DefaultAcsClient->getAcsResponse(Object(Aliyun\Api\Sms\Request\V20170525\SendSmsRequest))

#3 /home/misswell/Code/thinkphp_5.1.0_rc/application/index/controller/Index.php(25): app\common\lib\ali\Sms::sendSms(18624395279, 12345)

#4 [internal function]: app\index\controller\Index->sms()

#5 /home/misswell/Code/thinkphp_5.1.0 in /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/Http/HttpHelper.php on line 13



                                                                               

  [think\exception\ErrorException]                                             

  Uncaught Error: Call to undefined function Aliyun\Core\Http\curl_init() in   

  /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/Http/HttpHelper.p  

  hp:13                                                                        

  Stack trace:                                                                 

  #0 /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/DefaultAcsClie  

  nt.php(60): Aliyun\Core\Http\HttpHelper::curl('http://dysmsapi...', 'POST',  

   Array, Array)                                                               

  #1 /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/DefaultAcsClie  

  nt.php(22): Aliyun\Core\DefaultAcsClient->doActionImpl(Object(Aliyun\Api\Sm  

  s\Request\V20170525\SendSmsRequest), Object(Aliyun\Core\Auth\ShaHmac1Signer  

  ), Object(Aliyun\Core\Auth\Credential), true, 3)                             

  #2 /home/misswell/Code/thinkphp_5.1.0_rc/application/common/lib/ali/Sms.php  

  (102): Aliyun\Core\DefaultAcsClient->getAcsResponse(Object(Aliyun\Api\Sms\R  

  equest\V20170525\SendSmsRequest))                                            

  #3 /home/misswell/Code/thinkphp_5.1.0_rc/application/index/controller/Index  

  .php(25): app\common\lib\ali\Sms::sendSms(18624395279, 12345)                

  #4 [internal function]: app\index\controller\Index->sms()                    

  #5 /home/misswell/Code/thinkphp_5.1.0                                        

                                                                               



Exception trace:

 () at /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/Http/HttpHelper.php:13

 think\Error::appShutdown() at n/a:n/a




Fatal error: Uncaught Error: Call to undefined function Aliyun\Core\Http\curl_init() in /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/Http/HttpHelper.php:13

Stack trace:

#0 /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/DefaultAcsClient.php(60): Aliyun\Core\Http\HttpHelper::curl('http://dysmsapi...', 'POST', Array, Array)

#1 /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/DefaultAcsClient.php(22): Aliyun\Core\DefaultAcsClient->doActionImpl(Object(Aliyun\Api\Sms\Request\V20170525\SendSmsRequest), Object(Aliyun\Core\Auth\ShaHmac1Signer), Object(Aliyun\Core\Auth\Credential), true, 3)

#2 /home/misswell/Code/thinkphp_5.1.0_rc/application/common/lib/ali/Sms.php(102): Aliyun\Core\DefaultAcsClient->getAcsResponse(Object(Aliyun\Api\Sms\Request\V20170525\SendSmsRequest))

#3 /home/misswell/Code/thinkphp_5.1.0_rc/application/index/controller/Index.php(25): app\common\lib\ali\Sms::sendSms(18624395279, 12345)

#4 [internal function]: app\index\controller\Index->sms()

#5 /home/misswell/Code/thinkphp_5.1.0 in /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/Http/HttpHelper.php on line 13

[2018-04-15 11:30:38 *52064.3] ERROR zm_deactivate_swoole (ERROR 503): Fatal error: Uncaught Error: Call to undefined function Aliyun\Core\Http\curl_init() in /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/Http/HttpHelper.php:13

Stack trace:

#0 /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/DefaultAcsClient.php(60): Aliyun\Core\Http\HttpHelper::curl('http://dysmsapi...', 'POST', Array, Array)

#1 /home/misswell/Code/thinkphp_5.1.0_rc/extend/ali/lib/Core/DefaultAcsClient.php(22): Aliyun\Core\DefaultAcsClient->doActionImpl(

[2018-04-15 11:30:38 $52058.0] WARNING swManager_check_exit_status: worker#3 abnormal exit, status=255, signal=0


正在回答

1回答

你好,你需要安装curl扩展

0 回复 有任何疑惑可以回复我~
  • 提问者 guofengio #1
    是直接 apt-get install php7.0-curl 安装就可以了吗?试了下php.ini开启扩展后运行依然报错
    回复 有任何疑惑可以回复我~ 2018-04-15 12:20:32
  • 提问者 guofengio #2
    编译安装,解决了,谢谢。记录一下:
    https://www.guofeng.io/linux-ubuntu16-php7-compile-and-install-php-extensions-curl/
    回复 有任何疑惑可以回复我~ 2018-04-15 13:28:40
  • singwa 回复 提问者 guofengio #3
    解决 了 就好。赞。
    回复 有任何疑惑可以回复我~ 2018-04-15 13:39:22
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信