PHP gd库增加jpeg支持

wget http://www.ijg.org/files/jpegsrc.v9b.tar.gz
tar zxvf jpegsrc.v9b.tar.gz
cd jpeg-9b
./configure –prefix=/usr/local/jpeg –enable-shared –enable-static
make && make install

cd /alidata/server/temp/php-5.6.30/ext/gd
make clean
/alidata/server/php56/bin/phpize
./configure –with-php-config=/alidata/server/php56/bin/php-config –with-png-dir –with-freetype-dir=/usr/local/freetype.2.1.10 –with-jpeg-dir=/usr/local/jpeg –with-zlib-dir –with-gd
make && make install
/etc/init.d/php56-fpm restart

如果仍然不行,重新编译PHP。

如果重新编译仍然不行,那么就先不加gd选项编译PHP,然后再加上gd选项编译一次。



发表评论

电子邮件地址不会被公开。