企业微信和钉钉里微应用的设置都没问题,域名也都验证过,但登录的时候出现空白,报错信息如下:
[2021-05-21T16:54:46.809280+08:00] my_logger.INFO: begin:QyWeixinApi->getAccessToken [] []
[2021-05-21T16:54:46.812935+08:00] my_logger.INFO: curl info:https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=xxxxx&corpsecret=xxxxxxxxxx postData: [] []
[2021-05-21T16:54:46.922753+08:00] my_logger.INFO: [] []
[2021-05-21T16:54:46.922898+08:00] my_logger.ERROR: ["https:\/\/qyapi.weixin.qq.com\/cgi-bin\/gettoken?corpid=wweb6aef7f766d270f&corpsecret=xxxxxx","HTTP_ERROR_77",""] [] []
[2021-05-21T16:54:46.922926+08:00] my_logger.INFO: end:QyWeixinApi->getAccessToken [] []
[2021-05-21T16:54:46.922954+08:00] my_logger.DEBUG: Entering setSqlCacheData(wweb6aef7f766d270f_access_token) method ... [] []
[2021-05-21T16:54:46.928997+08:00] my_logger.DEBUG: Exiting setSqlCacheData() method ... [] []
[2021-05-21T16:54:46.929075+08:00] my_logger.INFO: access_token:expires_in:7000 createdtime:1621587286 [] []
[2021-05-21T16:54:46.929103+08:00] my_logger.INFO: Exiting:QyWeixin->getAccessToken [] []
[2021-05-21T16:54:46.929131+08:00] my_logger.INFO: begin:QyWeixinApi->getJsapiTicket [] []
[2021-05-21T16:54:46.929224+08:00] my_logger.ERROR: ["","REQUEST_CHECK_ERROR","client-check-error:Missing Required Arguments: access_token"] [] []
[2021-05-21T16:54:46.929262+08:00] my_logger.INFO: end:QyWeixinApi->getJsapiTicket [] []
[2021-05-21T16:54:46.929292+08:00] my_logger.DEBUG: Entering setSqlCacheData(wweb6aef7f766d270f_jsApi_ticket) method ... [] []
[2021-05-21T16:54:46.931852+08:00] my_logger.DEBUG: Exiting setSqlCacheData() method ... [] []
[2021-05-21T16:54:46.931904+08:00] my_logger.INFO: jsApiTicket: expires_in:7000 createdtime:1621587286 [] []
[2021-05-21T16:54:46.931931+08:00] my_logger.INFO: Exiting:QyWeixin->getJsApiTicket [] []
[2021-05-21T16:54:46.931956+08:00] my_logger.DEBUG: Entering QyWeixin->getAgentJsApiTicket()... [] []
[2021-05-21T16:54:46.931982+08:00] my_logger.DEBUG: Entering getSqlCacheData(wweb6aef7f766d270f_agent_jsApi_ticket) method ... [] []
[2021-05-21T16:54:46.932022+08:00] my_logger.DEBUG: Exiting getSqlCacheData() method ... [] []
[2021-05-21T16:54:46.932046+08:00] my_logger.INFO: Entering:QyWeixin->getAccessToken [] []
[2021-05-21T16:54:46.932068+08:00] my_logger.DEBUG: Entering getSqlCacheData(wweb6aef7f766d270f_access_token) method ... [] []
[2021-05-21T16:54:46.932137+08:00] my_logger.DEBUG: Exiting getSqlCacheData() method ... [] []
[2021-05-21T16:54:46.932162+08:00] my_logger.INFO: access_token:expires_in:7000 createdtime:1621587286 [] []
[2021-05-21T16:54:46.932191+08:00] my_logger.INFO: Exiting:QyWeixin->getAccessToken [] []
[2021-05-21T16:54:46.932216+08:00] my_logger.INFO: begin:QyWeixinApi->getAgentJsapiTicket [] []
[2021-05-21T16:54:46.932290+08:00] my_logger.ERROR: ["","REQUEST_CHECK_ERROR","client-check-error:Missing Required Arguments: access_token"] [] []
[2021-05-21T16:54:46.932317+08:00] my_logger.INFO: end:QyWeixinApi->getAgentJsapiTicket [] []
[2021-05-21T16:54:46.932343+08:00] my_logger.DEBUG: Entering setSqlCacheData(wweb6aef7f766d270f_agent_jsApi_ticket) method ... [] []
[2021-05-21T16:54:46.933571+08:00] my_logger.DEBUG: Exiting setSqlCacheData() method ... [] []
[2021-05-21T16:54:46.933619+08:00] my_logger.INFO: agentJsApiTicket: expires_in:7000 createdtime:1621587286 [] []
[2021-05-21T16:54:46.933648+08:00] my_logger.INFO: Exiting:QyWeixin->getAgentJsApiTicket [] []
[2021-05-21T16:54:46.933684+08:00] my_logger.INFO: Exiting Qyweixin_CrmoneRestServiceImpl->setJsConfig [] []
[2021-05-21T16:54:46.933721+08:00] my_logger.INFO: End: QyWeiXin_CrmoneRestService->serve [] []
经过开发人员的研究,无法正常运行原来和curl有关系,需要重新编译curl,更换编译参数,更换ssl_version NSS为openssl,详细操作步骤如下:
1.查看本机curl 版本
curl -V
curl 7.29.0 (x86_64-unknown-linux-gnu) libcurl/7.29.0 OpenSSL/1.0.2k zlib/1.2.7 libidn/1.28
Protocols: tftp ftp telnet dict http file https ftps
Features: IDN IPv6 Largefile NTLM SSL libz
2.下载
wget -c http://curl.haxx.se/download/archeology/curl-7.29.0.tar.gz
3.解压
tar -zxf curl-7.29.0.tar.gz
4.编译安装
cd curl-7.29.0
./configure --without-nss --with-ssl
make && make install
说明:–without-nss 禁用nss, –with-ssl启用openssl的支持.
5.将curl的库载入动态共享文件,并重新加载
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
这一部很重要,否则php的curl就是不会支持openssl
6.查看新安装后curl的版本
curl -V
curl 7.29.0 (x86_64-unknown-linux-gnu) libcurl/7.29.0 OpenSSL/1.0.2k zlib/1.2.7 libidn/1.28
Protocols: tftp ftp telnet dict http file https ftps
Features: IDN IPv6 Largefile NTLM SSL libz
7.重启你的httpd/nginx服务和php服务器
service nginx restart #或service httpd restart
service php-fpm restart
如果已经安装升级curl,记得还要重启phpfpm,否则不会生效。