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 完整的 ...
随机推荐
- thinkphp5实现多级控制器
默认情况下目录结构 application ->admin->controller->class.php 当项目比较多的时候,目录下控制器文件较多,考虑按模块增加一层目录 appli ...
- 十、JAVA面试简答
2.ASCII编码表的常识 3.&和&&,|和||的区别 下面我们就分成三组对问题进行分析:分别是&和&&,|和||及~和!. 1.&是按位与操 ...
- Layer 创建 和 lamdba function 创建 和 API GateWay 配置 和 添加依赖
进入控制台 选择 Lamdba 服务 进入控制面板, 单击右边: 创建函数 然后进入此图界面 添加lamdba 函数 名称 选择运行环境:python 选择角色 选择现有角色, 角色创建 可以参考 无 ...
- log4j 配置日志输出(log4j.properties)
轉: https://blog.csdn.net/qq_29166327/article/details/80467593 一.入门log4j实例 1.1 下载解压log4j.jar(地址:http: ...
- 非WifI环境处理
//1.创建网络状态监测管理者 AFNetworkReachabilityManager *mangerStatus = [AFNetworkReachabilityManager sharedMan ...
- 【mysql】:mysql性能优化总结
一.Mysql引擎概述 1.MyISAM存储引擎 MyISAM表是独立于操作系统的,这说明可以轻松地将其从Windows服务器移植到Linux服务器:每当我们建立一个MyISAM引擎的表时,就会在本地 ...
- Python Day 11
阅读目录 内容回顾 函数的参数 函数的嵌套调用 ##内容回顾 # 什么是函数:具体特定功能的代码块 - 特定功能代码块作为一个整体,并给该整体命名,就是函数 # 函数的优点: # 1.减少代码的冗余 ...
- 重写toFixed()方法
1.直接在原型上修改,仍然使用元调用方式 Number.prototype.toFixed = function (exponent) { return parseInt(this * Math.po ...
- 小白的CTF学习之路8——节约内存的编程方式
今天第二更,废话不说上干货 上一章我们学习了内存和cpu间的互动方式,了解到内存的空间非常有限,所以这样就需要我们在编程的时候尽可能的节省内存空间,用最少的空间发挥最大的效果,以下是几种节约内存的方法 ...
- hprose for php
1.客户端和服务器简单DEMO 通过工厂方法 create 创建客户端 $client = \Hprose\Client::create($uriList = null[, $async = true ...