### [图文详解wordpress用wechat-social-login插件实现QQ微信钉钉Github手机号登陆](https://www.prosaas.cn/article/8728) **Published:** 2021-03-24T09:44:15 **Author:** 5201314 **Excerpt:** 下面由WordPress教程栏目给大家介绍wordpress用wechat-social-login插件实现Q… 下面由**WordPress**教程栏目给大家介绍wordpress用wechat-social-login插件实现QQ微信钉钉Github手机号登陆方法,希望对需要的朋友有所帮助! ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212131539145.jpg) wordpress用wechat-social-login插件实现QQ微信钉钉Github手机号登陆 > wordpress版本:wordpress:4.9.8版本 > php版本:v7.2.12 > dockcer镜像为:wordpress:4.9.8 ## 图形验证码加载不出来 最近利用wordpress建站的时候,用到了`wechat-social-login`插件实现`微信、QQ、钉钉、Github`登陆功能时,开启图形验证码功能后,看到图形二维码一直加载不出来,`F12`看到状态码为200,但没有返回值,报错`This request has no response data available` ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212131539210.png) ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212131539626.png) 打开wordpress日志后,发现`debug`日志文件中报以下的错误。开启debug日志方法请移步历史文章如何开启WordPress调试模式(报错提示),将日志打印到`wp-content`目录下的`debug.log`中。 ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212131539377.png) \[08-Feb-2020 07:37:42 UTC\] PHP Fatal error:  Uncaught Error: Call to undefined function Gregwar\\Captcha\\imagettfbbox() in /var/www/html/wp-content/plugins/wechat-social-login/includes/captcha/CaptchaBuilder.php:327 Stack trace: #0 /var/www/html/wp-content/plugins/wechat-social-login/includes/captcha/CaptchaBuilder.php(440): Gregwar\\Captcha\\CaptchaBuilder->writePhrase(Resource id #7, '84sx', '/var/www/html/w...', 150, 40) #1 /var/www/html/wp-content/plugins/wechat-social-login/includes/social/class-xh-social-ajax.php(203): Gregwar\\Captcha\\CaptchaBuilder->build() #2 /var/www/html/wp-content/plugins/wechat-social-login/includes/social/class-xh-social-ajax.php(209): XH\_Social\_Ajax::{closure}() #3 /var/www/html/wp-includes/class-wp-hook.php(286): XH\_Social\_Ajax::captcha('') #4 /var/www/html/wp-includes/class-wp-hook.php(310): WP\_Hook->apply\_filters('', Array) #5 /var/www/html/wp-includes/plugin.php(453): WP\_Hook->do\_action(Array) #6 /var/www/html/wp-admin/admin-ajax.php(99): do\_action('wp\_ajax\_xh\_soci...') #7 {main}   thrown in /var/www/html/wp-content/plugins/wechat-social-login/includes/captcha/CaptchaBuilder.php on line 327 网站查询资料说:图形验证码功能需要安装`gd库`和`freetype`等依赖,通过phpinfo()查看到详细信息里:`gd扩展没有freetype`: ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212131539714.png) ## 查看phpinfo()的方法 在网站的根目录下新建一个`php-info.php`的文件,内容为:  /etc/apt/sources.list RUN apt update \\ && apt install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev \\ && docker-php-source extract \\ && cd /usr/src/php/ext/gd \\ && docker-php-ext-configure gd --with-webp-dir=/usr/include/webp --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-freetype-dir=/usr/include/freetype2 \\ && docker-php-ext-install gd \\ && php -m | grep gd 执行以下编译命令: docker build -t wordpress-freetype:4.9.8 . 结果编译报错。 ## docker编译镜像报错 OCI runtime create failed: container\_linux.go:346: starting container process caused "process\_linux.go:319: getting the final child's pid from pipe caused \\"EOF\\"": unknown 因为我使用的是19.03.5版本的docker,在网上查了资料,大致意思是需要18版本的docker编译才不会报错。 果然,18版本的docker编译没有报错: ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212131539890.png) ## 使用集成了freetype的新镜像 使用新镜像后,可以看到freetype成功集成。 ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212131539960.png) 可以看到二维码已经成功的显示出来了。 ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212131539346.png) 以上就是图文详解wordpress用wechat-social-login插件实现QQ微信钉钉Github手机号登陆的详细内容,更多请关注知企PROSAAS其它相关文章! **Tags:** docker, GD库, github, https, php, this, WordPress **Categories:** WordPress ---