百度空间 | 百度首页 
               
 
查看文章
 
php+ImageMagick配置
2007-10-29 18:12


php 5.2.4
ImageMagick-6.3.6-3.tar.bz2
MagickWandForPHP-1.0.5.tar.gz


http://www.magickwand.org/download/php/MagickWandForPHP-1.0.5.tar.gz
ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.3.2-9.tar.bz2


一,首先第一次编译php:

./configure --prefix=/usr/local/php                
    --with-apxs2=/usr/local/apache/bin/apxs           
    --with-mysql=/usr/local/mysql                    
    --with-mysqli=/usr/local/mysql/bin/mysql_config   
    --with-libxml=/usr/local/libxml2
    --with-png-dir=/usr/local/libpng2                   
    --with-jpeg-dir=/usr/local/jpeg6
    --with-zlib=/usr/local/zlib
    --with-freetype=/usr/local/freetype
    --with-gd=/usr/local/gd2  
    --enable-track-vars  
    --enable-mbstring=all

二,编译安装ImageMagick:

tar -jxvf ImageMagick-6.3.6-3.tar.bz2
cd ImageMagick-6.3.6-3

./configure --prefix=/usr/local/imagemagick

make
make install

三,再次编译PHP,加入imagick模块的支持:

tar -zxvf MagickWandForPHP-1.0.5.tar.gz
mv MagicWandforPHP-1.0.5 php-5.2.4/ext/magickwand

cd php-5.2.4/ext/magickwand
/usr/local/php/bin/phpize

cd /usr/src/php-5.2.4
make clean

rm configure
./buildconf --force

检查是否正确支持:
./configure --help | grep magickwand
--with-magickwand=DIR Include Magickwand support

-- 编译成模块 ----------------------
./configure \
   --enable-shared \
   --with-magickwand=shared,/usr/local/imagemagic \
   --enable-module=shared,magickwand

make

find . -name "magickwand.so" -exec ls -lh {} \;
cp modules/magickwand.so /usr/local/php/lib/php/magickwand.so


vi /usr/local/php/lib/php.ini
extenstion=magickwand.so

------------   直接编译 -----------------

./configure --prefix=/usr/local/php                
    --with-apxs2=/usr/local/apache/bin/apxs           
    --with-mysql=/usr/local/mysql                    
    --with-mysqli=/usr/local/mysql/bin/mysql_config   
    --with-libxml=/usr/local/libxml2
    --with-png-dir=/usr/local/libpng2                   
    --with-jpeg-dir=/usr/local/jpeg6
    --with-zlib=/usr/local/zlib
    --with-freetype=/usr/local/freetype
    --with-gd=/usr/local/gd2  
    --enable-track-vars  
    --enable-mbstring=all
    --with-magickwand=/usr/local/imagemagic


类别:默认分类 | 浏览() | 评论 (1)
 
最近读者:
 
网友评论:
1
2008-05-19 09:53 | 回复
没看明白,能否加Q细说下? 我Q:707701250
 
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu