Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
323 views
in Technique[技术] by (71.8m points)

php从7.1 升到 7.3 后 imagejpeg() 不存在了

image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. 先确认gd扩展是否安装 php --ri gd
  2. 如果已经安装了gd的话有可能是安装不完整,检查 ./configure 时 是否有这两个参数 --with-jpeg-dir=yourDir, --with-freetype-dir=yourDir这两个参数

如果正确安装,php --ri gd的结果应该是

gd

GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.8.0
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 6b
PNG Support => enabled
libPNG Version => 1.5.13
WBMP Support => enabled
XBM Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 1 => 1

另外可以用这个命令 php -i | grep configure | sed -e "s/Configure Command => //; s/'//g" 查看安装php ./configure时带的参数,仔细检查一下


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...