[08-Feb-2020 07:37:42 UTC] PHP Fatal error: Uncaught Error: Call to undefined function GregwarCaptchaimagettfbbox() in /var/ /html/wp-content/plugins/wechat-social-login/includes/captcha/CaptchaBuilder.php:327
Stack trace:
#0 /var/ /html/wp-content/plugins/wechat-social-login/includes/captcha/CaptchaBuilder.php(440): GregwarCaptchaCaptchaBuilder->writePhrase(Resource id #7, '84sx', '/var/ /html/w...', 150, 40)
#1 /var/ /html/wp-content/plugins/wechat-social-login/includes/social/class-xh-social-ajax.php(203): GregwarCaptchaCaptchaBuilder->build()
#2 /var/ /html/wp-content/plugins/wechat-social-login/includes/social/class-xh-social-ajax.php(209): XH_Social_Ajax::{closure}()
#3 /var/ /html/wp-includes/class-wp-hook.php(286): XH_Social_Ajax::captcha('')
#4 /var/ /html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#5 /var/ /html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#6 /var/ /html/wp-admin/admin-ajax.php(99): do_action('wp_ajax_xh_soci...')
#7 {main}
thrown in /var/ /html/wp-content/plugins/wechat-social-login/includes/captcha/CaptchaBuilder.php on line 327
网站查询资料说:图形验证码功能需要安装gd库和freetype等依赖,通过phpinfo()查看到详细信息里:gd扩展没有freetype:
保存后,用域名访问,如https://action.liabio.cn/php-info.php,即可看到。
FROM wordpress:4.9.8
RUN echo 'deb http://mirrors.163.com/debian/ stretch main contrib non-freendeb http://mirrors.163.com/debian/ stretch-updates main contrib non-freendeb http://mirrors.163.com/debian/ stretch-backports main contrib non-free' > /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 .
结果编译报错。
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编译才不会报错。版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!