php支持gd库

By SuperTaoer | 七月 13, 2005
Under: 程序 技术 周边
Views:

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

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

先列出配置gd2需要的网址

gd-2.0.33.tar.gz

http://www.boutell.com/gd

jpegsrc.v6b.tar.gz
ftp://ftp.uu.net/graphics/jpeg

http://www.ijg.org

libpng-1.2.7.tar.tar

http://www.libpng.org/pub/png/libpng.html

http://libpng.sourceforge.net

http://sourceforge.net/projects/libpng

zlib-1.2.2.tar.gz

http://www.zlib.net

http://sourceforge.net/projects/zlib

freetype-2.1.9.tar.gz

http://www.freetype.org

http://freetype.sourceforge.net/index2.html

http://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就可以啦 :)

差..好文!! (还没评价)
Loading ... Loading ...

Leave a Message

1 Message

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

Ping Back来自:blog.csdn.net

 

RSS feed for comments on this post. TrackBack URI

Leave a Message