[PHP-users 32024] Re: php で imagemagick

Masaaki Suga suga @ tenrikyo.or.jp
2007年 4月 24日 (火) 09:59:50 JST


須賀です
自己レスです

Masaaki Suga <suga @ tenrikyo.or.jp> wrote:

> 結局,
> 
> > 動的なインストール
> 
> をしてみました
> 
> 以下のようなphpを実行すると,apacheのログに
> 
> [notice] child pid 25780 exit signal Segmentation Fault (11)
> 
> がでて動きません
> 
> <?php
>         $handle = imagick_readimage( "./image.jpg" ) ;
>         if ( imagick_iserror( $handle ) )
>         {
>                 $reason      = imagick_failedreason( $handle ) ;
>                 $description = imagick_faileddescription( $handle ) ;
>                 print "handle failed!<BR>\nReason: $reason<BR>\nDescription: $description<
> BR>\n" ;
>         exit ;
>         }
>         print "Image height is " . imagick_getheight( $handle ) .
>           " pixels<BR>\n" ;
> ?>
> 
> imagick.so自体がうまくできていないようですが,
> >    phpのソースDirectory/ext/imagickで
> >        ./configure --with-magick=・・・
> >                ※ ・・・はimagemagickのインストール先Directory
> >        gmake
> で特にエラーは出ていません
> 
ImageMagickでjpegが扱えない状態だったのが原因でした

identify -list formatで確認したところjpegが使えない状態でした

jpeg-6b.tar.gzをインストールするときに
./configure
としていたのを
./configure --enable-shared
にすれば,うまくいけました

一応,phpからimagickの関数を使えるようになりました
ありがとうございました


今後とも,よろしくお願いします

 -------------------------------
 須賀正明:suga @ tenrikyo.or.jp
 -------------------------------



PHP-users メーリングリストの案内