wordpress version: wordpress: 4.9.8 version
php version: v7.2.12
dockcer mirror image: wordpress: 4.9.8
Article Directory
CAPTCHA load out
Use wordpress recent establishment of the time, used the wechat-social-login
plug-in implementation 微信、QQ、钉钉、Github
landing function is turned on after the graphic verification code function, see the graphic two-dimensional code has been loaded not come out, F12
see the status code is 200, but no return value, errorThis request has no response data available
After opening wordpress log and found debug
the following error log file mid-year report. Turn on debug logging methods venue history articles how to turn WordPress debug mode (error prompt) , to print the log wp-content
directory debug.log
in.
[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
Information website said: CAPTCHA functionality you need to install gd库
and freetype
so on dependence () to view detailed information in by phpinfo: gd扩展没有freetype
:
View phpinfo () method
Create a website in the root directory of php-info.php
the file, reads:
<?php
phpinfo();
Once saved, accessed using the domain name, such as https://action.liabio.cn/php-info.php
can be seen.
docker compiled Mirror
Dockerfile file as follows:
FROM wordpress:4.9.8
RUN echo 'deb http://mirrors.163.com/debian/ stretch main contrib non-free\ndeb http://mirrors.163.com/debian/ stretch-updates main contrib non-free\ndeb 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
Compile the following command:
docker build -t wordpress-freetype:4.9.8 .
The results compilation error.
docker compiler error mirror
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
Because I'm using version 19.03.5 docker, check the information on the Internet, roughly meaning docker need 18 versions of the compiler did not complain.
Sure enough, docker compiled version of the 18 no error:
Use integrates new image of freetype
After using the new image, you can see freetype successful integration.
We can see the two-dimensional code has been successfully displayed.
reference
After the installation did not expand at docker official mysqli gd php mirror