lXpm -lX11
改 INCLUDEDIRS=-I. -I/usr/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11
为 INCLUDEDIRS=-I. -I/usr/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include/freetype
)
make
make install
PHP 的安装:
文件名:php-4.0.4pl1.tar.gz
版本:4.04 Patch Level 1
下载站点:http://www.php.net/
下载位置:http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gz&source_site=www.php.net
安装方法:/usr/local/bin/gzip -d < php-4.0.4pl1.tar.gz | 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