Heim  >  Artikel  >  Backend-Entwicklung  >  GD库已经开启

GD库已经开启

WBOY
WBOYOriginal
2016-06-23 13:53:46827Durchsuche

linux,GD库已经开启,是yum install安装的
[root@VM-DEV-1 ~]# rpm -qa |grep php
php53u-pdo-5.3.28-5.ius.centos5
php53u-cli-5.3.28-5.ius.centos5
php53u-fpm-5.3.28-5.ius.centos5
php53u-xmlrpc-5.3.28-5.ius.centos5
php53u-gd-5.3.28-5.ius.centos5
php53u-common-5.3.28-5.ius.centos5
php53u-5.3.28-5.ius.centos5
php53u-xml-5.3.28-5.ius.centos5
php53u-mysql-5.3.28-5.ius.centos5

但是验证码还是不显示


回复讨论(解决方案)

单独执行验证码文件看行不行。

验证码是图片,必须用 img 标记引用
验证码生成程序不能在 php 标记以外有任何输出,包括 BOM 头
验证码生成程序不能有 echo、print 等有文本输出的语句,当然也不能有任何错误
注释掉 header 语句,在浏览器中直接访问验证码生成程序,直到没有错误为止

单独执行验证码文件看行不行。

一片白

验证码是图片,必须用 img 标记引用
验证码生成程序不能在 php 标记以外有任何输出,包括 BOM 头
验证码生成程序不能有 echo、print 等有文本输出的语句,当然也不能有任何错误
注释掉 header 语句,在浏览器中直接访问验证码生成程序,直到没有错误为止

这是刚装上去的程序,本地好的,linux不行,就环境的区别

错误提示打开看看。如果还不行,将header注释掉看报什么错。

错误提示打开看看。如果还不行,将header注释掉看报什么错。


什么header,加了error_reporting(E_ALL);ini_set("display_errors","On");访问验证码php会报这个
Warning: _08_Verification_Code::CreateImage(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /data/www/syslog/teapi.jysq.cn/cmsauto/include/verification_code.php on line 252 Fatal error: Call to undefined function mb_convert_encoding() in /data/www/syslog/teapi.jysq.cn/cmsauto/include/verification_code.php on line 252 
 

1、php.ini 中设置下一下时区,或者用date_default_timezone_set()也可。
2、需要安装 php-mbstring库文件才能使用mb_系列函数。可用命令 $ sudo yum install php-mbstring  安装。

1、php.ini 中设置下一下时区,或者用date_default_timezone_set()也可。
2、需要安装 php-mbstring库文件才能使用mb_系列函数。可用命令 $ sudo yum install php-mbstring  安装。



1、php.ini 中设置下一下时区,或者用date_default_timezone_set()也可。
2、需要安装 php-mbstring库文件才能使用mb_系列函数。可用命令 $ sudo yum install php-mbstring  安装。



1、php.ini 中设置下一下时区,或者用date_default_timezone_set()也可。
2、需要安装 php-mbstring库文件才能使用mb_系列函数。可用命令 $ sudo yum install php-mbstring  安装。


3Q虽然不是那个命令,但是mbstring库没加载
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:CI框架 树形Nächster Artikel:提取TXT里数据出错