[摘要]tar vxf - ./configure --with-apache=../apache_1.3.17 --with-gd=/usr/local \ --with-jpeg-dir=/usr/lo...
tar vxf -
./configure --with-apache=../apache_1.3.17 --with-gd=/usr/local \
--with-jpeg-dir=/usr/local --with-xpm-dir=/usr/local \
--with-ttf=/usr/local/freetype --with-t1lib=/usr/local \
--with-zlib=/usr/local --with-tiff-dir=/usr/local \
--with-png-dir=/usr/local
(编辑 ext/gd/gd.c
寻找 #ifndef USE_GD_IOCTX 加入 #define gdImageCreateFromGifCtx NULL
替换 _php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_GIF, "GIF", gdImageCreateFromGif,NULL);
为 _php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_GIF, "GIF", dImageCreateFromGif,gdImageCreateFromGifCtx);
)
make
make install
您可以自行添加PHP的编译选项来满足你自己的需要,linux下的安装也差不多,
安装完毕后用<? phpinfo(); ?>查看结果如下:
gd
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with TTF library
T1Lib Support enabled
GIF Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
关键词:PHP下GD安装全攻略