`

[转旧同事文章] php支持gd库

 
阅读更多

from: http://blog.taoer.com/2005/07/13/php-gd-support-gd-config/ ---SuperTaoer::套子的陋室

今天给x3zone装了一个论坛
在测试注册功能的时候
发现验证码图片显示不出来

最后查看phpinfo()
感觉是gd库上次没有配制成功

先列出配置gd2需要的网址

gd-2.0.33.tar.gz
www.boutell.com/gd

jpegsrc.v6b.tar.gz
ftp.uu.net/graphics/jpeg
www.ijg.org

libpng-1.2.7.tar.tar
www.libpng.org/pub/png/libpng.html
libpng.sourceforge.net
sourceforge.net/projects/libpng

zlib-1.2.2.tar.gz
www.zlib.net
sourceforge.net/projects/zlib

freetype-2.1.9.tar.gz
www.freetype.org
freetype.sourceforge.net/index2.html
sourceforge.net/projects/freetype

—————
下面开始配置

编译zlib
./configure –prefix=/usr/local/zlib
make
make install

编译libpng
mv ./scripts/makefile.linux ./makefile
make
make install

编译freetype
./configure –prefix=/usr/local/freetype
make
make install

编译jpeg
./configure –enable-shared
make
make test
make install

编译gd2
./configure –with-png –with-jpeg –with-freetype=/usr/local/freetype
make
make install

——-
最后重新编译php
./configure
–prefix=/usr/local/php/
–enable-force-cgi-redirect
–enable-mbstring=all
–enable-mbregex
–enable-mbstr-enc-trans
–enable-versioning
–enable-trans-sid
–enable-ftp
–with-mysql=/usr/local/mysql/
–with-apxs2=/usr/local/apache2/bin/apxs
–with-openssl=/usr/local/openssl
–with-soap=yes
–with-curl=/usr/local/curl/
–with-zlib-dir=/usr/local/zlib/
–with-mcrypt=/usr/local/libmcrypt/
–with-gd=/usr/local/gd2
–with-jpeg-dir=/usr
–with-freetype-dir=/usr/local/freetype
–with-ttf
–with-png-dir=/usr

然后重新安装一下Zend就可以啦 :)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics