时间:2021-07-01 10:21:17 帮助过:29人阅读
GD Support | enabled |
GD Version | bundled (2.0.34 compatible) |
GIF Read Support | enabled |
GIF Create Support | enabled |
PNG Support | enabled |
libPNG Version | 1.2.49 |
WBMP Support | enabled |
XBM Support | enabled |
wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz
tar -zxvf jpegsrc.v8b.tar.gz
cd jpeg-8b
./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
make && make install
下面进入到 php 源码目录下 的 ext 下的 gd目录
进入gd 目录后执行 注意下面的 /usr/local/php/ 是你服务器 php的安装路径。我的是 这个路径就写成这样了
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-jpeg-dir=/usr/local/jpeg/
make && make install
执行完这些 系统就会提示你 gd.so 生成目录
在php.ini下 添加 gd.so 后 重启php 重启 应用服务器后就OK了
有些机器可能还不行,这样解决
yum install libjpeg-devel freetype-devel libpng-devel
make clean后重新./configure
make&make install
查看phpinfo OK了
GD Support enabledGD Version 2.0GIF Read Support enabledGIF Create Support enabledJPEG Support enabledlibJPEG Version unknownPNG Support enabledlibPNG Version 1.2.10WBMP Support enabled
GD Support | enabled |
GD Version | bundled (2.0.34 compatible) |
GIF Read Support | enabled |
GIF Create Support | enabled |
JPEG Support | enabled |
libJPEG Version | 8 |
PNG Support | enabled |
libPNG Version | 1.2.49 |
WBMP Support | enabled |
XBM Support | enabled |
gd.jpeg_ignore_warning | 0 | 0 |