• 欢迎访问水熊虫网站,这里是我个人的工作博客,内容大多是遇到问题完善后,会在这里进行总结归纳内容! QQ群
  • 网站导航中的友情链接专栏上线,更新的都是自己这三年整理的一些东西,感兴趣可以看看!
  • 你所浪费的今天,是昨天死去的人奢望的明天。你所厌恶的现在,是未来的你回不去的曾经!

[解决方法]织梦dedecms V5.6、V5.7验证码不显示

虚拟主机 WaterBear 7年前 (2017-03-23) 929次浏览 已收录 扫描二维码

最近使用linux的主机安装编译php后,在安装dedecms5.6 、5.7发现dede后台登陆的时候验证码是叉叉xxx.显示不了,网上找了好多方法都是,修改datasafeinc_safe_config.php 这个配置文件,修改$safe_gdopen = '1,2,3,5,6,7'; 为$safe_gdopen = ''; 这样去掉了所有验证码,治标不治本,后来发现dedecms5.6采用securimage php脚本来生成验证码,而securimage的要求又要GD存在,而securimage必须php支持gd2以及freetype,默认安装php的时候freetype一般是不会安装的,安装freetype即可支持。

解决方法

一、探测php环境组件

随便找个探针 或 用下面的另存为  phpinfo.php  文件
<?
phpinfo()
?>
查一下有没有gd 有就ok 没有就想办法装上

按照 本blog 文章 Linux(CentOS6.3)下编译安装php-5.3.18及出现问题的解决方法 的安装方法一般不对出错 :http://blog.rekfan.com/articles/199.html

二、Securimage Test Script 环境支持测试

官方网址:http://www.phpcaptcha.org/

Securimage Test Script下载地址:
http://www.phpcaptcha.org/downloads/securimage_test.zip

下载了之后,传到你的网站上,然后访问上传的文件,会自动探测服务器上的组件,看下差什么就补什么,如果是正常的话,会有一个自动生成的笑脸,那么验证码就可以显示了。

扫描后的结果,发现服务器php环境缺少freetype:

Securimage Test Script
This script will test your PHP installation to see if Securimage will run on your server.
GD Support: Yes!
GD Version: bundled (2.0.34 compatible)
imageftbbox function: No
The imageftbbox() function is not included with your gd build. This function is required.
TTF Support (FreeType): No
No FreeType support. You cannot use Securimage 3.0, but can use 2.0 with gd fonts.
JPEG Support: Yes!
PNG Support: Yes!
GIF Read Support: Yes!
GIF Create Support: Yes!
Based on the requirements, you do not have what it takes to run Securimage :(

安装freetype后提示:

Securimage Test Script
This script will test your PHP installation to see if Securimage will run on your server.
GD Support: Yes!
GD Version: bundled (2.0.34 compatible)
imageftbbox function: Yes!
TTF Support (FreeType): Yes!
JPEG Support: Yes!
PNG Support: Yes!
GIF Read Support: Yes!
GIF Create Support: Yes!
Since you can see this...

如还不能那么可能就是data下 sessions 这个目录及文件权限改成777


WaterBear , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:[解决方法]织梦dedecms V5.6、V5.7验证码不显示
喜欢 (0)
[[email protected]]
分享 (0)