Warning: imagettfbbox(): Could not read font in XXX on line X
今天在做图形验证码的时候,在windows运行好好的代码在CentOS下却无法运行了。报了如下警告
Warning: imagettfbbox(): Could not read font in /mnt/hgfs/web/test/clicaptcha.class.php on line 15
通过查看文章得知,需要使用的字体类型是TrueType fonts

原本默认的是使用的SourceHanSansCN-Normal.otf字体,如下图,通过file命令查看得知是属于OpenType类型,虽然在windows下是可以的,但是在CentOS下却出现了,兼容性问题,所以我有找了一个TrueType字体进行替换,替换后就好了

Warning: imagettfbbox(): Could not read font in XXX on line X的更多相关文章
- [可能没有默认的字体]Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename...
Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename... [可能没有默认的字体] 例: //putenv('G ...
- Warning: Multiple build commands for output file /xxx
xcode中 有时候会报一个警告: [WARN]Warning: Multiple build commands for output file /xxx 要解决这个问题很简单: 1.选择你的工程 2 ...
- Error running 'xxx': Command line is too long. Shorten command line for xxx
跑单元测试时,报错如下: Error running 'xxx': Command line is too long. Shorten command line for xxx 解决方案: 在项目所在 ...
- Warning: Received `false` for a non-boolean attribute `xxx`.
React对boolean类型的attribute的识别方式问题,可以采用以下方法解决: xxx={value ? 1 : 0} 改成数字的写法,不用布尔值. 具体可以参考:https://githu ...
- warning : json_decode(): option JSON_BIGINT_AS_STRING not implemented in xxx
先来一段json_decode官方说明 mixed json_decode ( string $json [, bool $assoc = false [, int $depth = 512 [, i ...
- PHP “Warning: session_start()...”、"correct (..\..\php5\Temp) in Unknown on line 0" 的解决方法
运行php的时候出现了一下警告: Warning: Unknown: open(D:/Program Files/php5/temp1\sess_l5b1a48m6kmb1g0t5cs33690v0, ...
- mysql 帮助手册 以及 warning: World-writable config file 以及 ERROR 1840 (HY000) at line 24:
1. mysql --help 2.报错 报错Warning: World-writable config file http://www.jb51.net/article/99027.htm 最近在 ...
- BEAMER中 Package Listings Warning: Text dropped after begin of listing on input line xx
Latex Beamer 模板 frame 中使用 listings package时总出现标题所示错误,无法前进.解决方法是在\begin{frame}后加上一个选项,即:\begin{frame} ...
- pyhon SyntaxError: Non-ASCII character '\xe8' in file xxx on line xx, but no encoding
import math if __name__ == '__main__': name1 = raw_input("请输入您的编号:") print name1 完整的 ...
随机推荐
- Quartz.Net进阶之五:TriggerListener 、JobListener 和 SchedulerListener
一.介绍 今天开始学习监听器,就是 Listener,在Quartz.Net 中,主要包含3类的监听器,主要内容包括:TriggerListener .JobListener 和 SchedulerL ...
- virtualbox装个 ubuntu
好久没弄 虚拟机了,感觉好不习惯 根据网上的步骤装了一ubuntu 启动报错 virtualbox intel_rapl: no valid rapl domains ...... 搜索到了一片中文博 ...
- win10与虚拟机fedora14使用samba文件共享
参考路径:http://blog.sina.com.cn/s/blog_ae9507be01017tyz.html 最近需要配置samba,试了好多次,终于搞定.奉上配置及共享文件的过程,以供参考. ...
- 20155312 张竞予 Exp 8 Web基础
Exp 8 Web基础 目录 基础问题回答 (1)什么是表单 (2)浏览器可以解析运行什么语言. (3)WebServer支持哪些动态语言 实践过程记录 1.Web前端:HTML 2.Web前端jav ...
- 别人的Linux私房菜(21)基础系统设置与备份策略
网络设置,手动设置IP,DHCP自动获取. 以太网协议开发出来的网卡ethN,N为数字. CentOS7对网卡命名的规则:eno代表由主板BIOS内建立的网卡,ens1由主板BIOS内建的PCI-E界 ...
- Ajax基本语法
案例代码: $(function(){ $('#send').click(function(){ $.ajax({ type: "GET", url: "test.jso ...
- 致C#,致我这工作一年(上)
回忆 最近比较闲,虽然我总是每天会在博客园逛上1~2个钟(最近是真的有点闲),看了很多人对于工作的感悟,谈程序员的职业规划,不知不觉出来工作我也快一年多了,我也想聊聊现在用C#找工作和我这一年多 ...
- Linux学习---自定义数据类型
struct 结构体 (地址递增) eg:struct myabc{ unsigned int a; unsigned int b; unsigned int c; unsigned int d; ...
- android6.0以上权限动态申请,有视频链接可以看效果。
android6.0以上某些权限需要动态申请,虽然现在大多的手机系统版本在6.0,但是升级到6.0及以上是迟早的事,所以如何能够更好的控制动态申请权限时能有好的提示用户,及给用户带去更好的体验,是需要 ...
- MySQL 多表结构的创建与分析
=====================多对一===================== create table press( id int primary key auto_increment, ...