[PHP-users 30026] Re: Call to undefined function: imagettftext()について

hosokawa qzt05475 @ nifty.com
2006年 8月 12日 (土) 17:17:09 JST


細川です。
こんにちは。 gd.so を探していると何処にもありませんでした。
いろいろあたってみて、php-gd-4.3.11-2.8 を yum でインストール
してみました。
ところが、ライブラリの重複エラーが発生しました。
php-gd と gd で重複してしまったのだと思います。
そこで、php ./configure で --without gd としました。
すると、以下の状態です。
php -i | grep -i freetype
Configure Command =>  './configure' '--with-config-file-path=/etc'
'--with-apxs2' '--enable-mbstring' '--enable-mbreqex'
'--enable-mbstr-enc-trans' '--enable-shared' '--without-gd' 
'--with-jpeg-dir'
'--with-png-dir' '--with-zlib-dir' '--with-ttf' '--with-freetype-dir'
'--enable-gd-native-ttf' '--enable-gd-jis-conv' '--with-mysql=/usr'
FreeType Support => enabled
FreeType Linkage => with freetype

以上で、なんとか、解決いたしました。

伊東さん。ありがとうございました。
なんとか、夏休みを獲得できそうです。ふーっ。






> 細川です。
> こんにちは、伊東さんもお仕事ですか、
> お試しいただきありがとうございます。
> 確認しますと以下のWarningがありました。
>
> php -i | grep -i freetype
> PHP Warning:  Unknown(): Unable to load dynamic library
> '/usr/lib/php4/gd.so' - /usr/lib/php4/gd.so: cannot open shared object 
> file:
> No such file or directory in Unknown on line 0
> Configure Command =>  './configure' '--with-config-file-path=/etc'
> '--with-apxs2' '--enable-mbstring' '--enable-mbreqex'
> '--enable-mbstr-enc-trans' '--enable-shared' '--with-gd' '--with-jpeg-dir'
> '--with-png-dir' '--with-zlib-dir' '--with-ttf' '--with-freetype-dir'
> '--enable-gd-native-ttf' '--enable-gd-jis-conv' '--with-mysql'
>
> gdは、確かにインストール済みでグラフィック処理は動作しています。
> /usr/lib/libgd.so.2 で動作できているのでしょうか。
> もう少し調べてみます。
>
>
>> 伊東です。こんにちは。私も仕事です!w
>>
>> 4.4.3の不具合の可能性も考えて、手元の環境でお試しインストールしてみました。 
>> 
>>
>>
>> CentOS-4.3
>> apache-1.3.36
>> gd-2.0.28、gd-devel-2.0.28(rpm)
>> freetype-2.1.9、freetype-devel-2.1.9(rpm)
>>
>> ### 状況を確認…
>> # php -v
>> PHP 4.4.3 (cli) (built: Aug 12 2006 13:27:32)
>> Copyright (c) 1997-2006 The PHP Group
>> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>>
>> # php -i | grep -i freetype
>> Configure Command =>  './configure'
>> '--with-apxs=/usr/local/apache/bin/apxs' '--enable-mbstring'
>> '--enable-mbregex' '--enable-mbstr-enc-trans' '--enable-shared'
>> '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-zlib-dir'
>> '--with-ttf' '--with-freetype-dir' '--enable-gd-native-ttf'
>> '--enable-gd-jis-conv' '--with-mysql'
>> FreeType Support => enabled
>> FreeType Linkage => with freetype
>>
>> ### とりあえずundefinedでないことを確認…
>> # php -r "imagettftext();"
>> Warning: Wrong parameter count for imagettftext() in Command line code on
>> line 1
>>
>> てな感じで、問題なさそうです。
>> configure時に何かWarningでてませんか?
>> gd、freetypeはrpmですか?-develも入ってますか?
>>
>> …apacheのバージョンとか違うので、参考にならんかもしれませんが、一応。
>>
>>
>>
>> 06/08/12 に hosokawa<qzt05475 @ nifty.com> さんは書きました:
>>> 問題は、グラフィックの描画はできるのですがTrueTypeFontの表示で
>>> 以下のエラーログが出力されます。
>>> PHP Fatal error:  Call to undefined function:  imagettftext()



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