国产成人精品18p,天天干成人网,无码专区狠狠躁天天躁,美女脱精光隐私扒开免费观看

wordpress如何實(shí)現QQ微信釘釘Github手機號登陸

發(fā)布時(shí)間:2021-10-17 00:52 來(lái)源: 閱讀:0 作者:藏色散人 欄目: CMS教程 歡迎投稿:712375056

下面由教程欄目給大家介紹wordpress怎么實(shí)現QQ微信釘釘Github手機號登陸,希望對需要的朋友有所幫助!

wordpress版本:wordpress:4.9.8版本
php版本:v7.2.12
dockcer鏡像為:wordpress:4.9.8

圖形驗證碼加載不出來(lái)

最近利用wordpress建站的時(shí)候,用到了wechat-social-login插件實(shí)現微信、QQ、釘釘、Github登陸功能時(shí),開(kāi)啟圖形驗證碼功能后,看到圖形二維碼一直加載不出來(lái),F12看到狀態(tài)碼為200,但沒(méi)有返回值,報錯This request has no response data available


打開(kāi)wordpress日志后,發(fā)現debug日志文件中報以下的錯誤。開(kāi)啟debug日志方法請移步歷史文章如何開(kāi)啟WordPress調試模式(報錯提示),將日志打印到wp-content目錄下的debug.log中。

[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

網(wǎng)站查詢(xún)資料說(shuō):圖形驗證碼功能需要安裝gd庫freetype等依賴(lài),通過(guò)phpinfo()查看到詳細信息里:gd擴展沒(méi)有freetype

查看phpinfo()的方法

在網(wǎng)站的根目錄下新建一個(gè)php-info.php的文件,內容為:

<?php

phpinfo();

保存后,用域名訪(fǎng)問(wèn),如https://action.liabio.cn/php-info.php,即可看到。

docker編譯鏡像

Dockerfile文件如下:

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

執行以下編譯命令:

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,在網(wǎng)上查了資料,大致意思是需要18版本的docker編譯才不會(huì )報錯。

果然,18版本的docker編譯沒(méi)有報錯:

使用集成了freetype的新鏡像

使用新鏡像后,可以看到freetype成功集成。

可以看到二維碼已經(jīng)成功的顯示出來(lái)了。

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自本網(wǎng)站內容采集于網(wǎng)絡(luò )互聯(lián)網(wǎng)轉載等其它媒體和分享為主,內容觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如侵犯了原作者的版權,請告知一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容,聯(lián)系我們QQ:712375056,同時(shí)歡迎投稿傳遞力量。

给我免费观看片在线观看中国| 久久WWW免费人成精品| 日本一卡二卡三卡四卡无卡免费网站| 亚洲av日韩综合一区二区三区| 久久SE精品一区二区 | 人妻少妇AV无码一区二区|