Hello, I try to compile mod_php with freetype support in gd. I have gd support with truetype -> [ebuild R ] media-libs/gd-2.0.32 -X +jpeg +png +truetype ** Configuration summary for gd 2.0.32: Support for PNG library: yes Support for JPEG library: yes Support for Freetype 2.x library: yes Support for Fontconfig library: no Support for Xpm library: no Support for pthreads: yes I have mod_php with : [ebuild R ] dev-php/mod_php-5.0.3 -adabas +apache2 +bcmath -berkdb -birdstep -bzlib +calendar -cdb -cpdflib +crypt +ctype +curl -curlwrappers -db2 +dba -dbase -dbm -dbmaker -dbx -debug +dio -empress -empress-bcs -esoob -exif -fam -fdftk +filepro -flatfile -frontbase +ftp +gd +gd-external +gdbm -gmp -hyperwave-api +iconv +imap -informix -ingres -inifile -interbase -iodbc +jpeg -kerberos -ldap -libedit -mcve +memlimit +mhash +mime -ming -mnogosearch -msession -msql -mssql +mysql -mysqli +ncurses -nis +nls -oci8 -odbc -oracle7 -ovrimos +pcntl -pcre -pfpro +png -posix -postgres -qdbm +readline -recode -sapdb -sasl +session -shared -sharedmem +simplexml +snmp +soap +sockets -solid +spell -spl -sqlite +ssl -sybase -sybase-ct +sysvipc -tidy +tiff -tokenizer +truetype -wddx +xml2 -xmlrpc -xpm -xsl +zlib But on my phpinfo.php GD has no support off freetype. Any idea ? Regards. Reproducible: Always Steps to Reproduce: 1. 2. 3.
rebuild php and attach the config.log and full log output from portage building php.
Created attachment 48079 [details] Mod_PHP 5.0.3 config.log file
Created attachment 48080 [details] Emerge mod_php build log
Hello, You can find attached the logs you ask me. Regards.
Hi, Please leave the status field alone in future. Changing it does not help us to help you any quicker. Thank you for your understanding, Stu
I am having the same problem with 5.0.3-r2. I have the following USE variables in my /etc/make.conf so I am sure I do not have a problem there. SE="ipv6 -alsa activefilter apache2 -berkdb bzlib calendar cups curl curlwrappers -dba -doc -esd exif exiscan-acl flash freetype ftp gd gd-external -gdbm gif -gnome gnutls -hardened hardenedphp imap imlib j2ee java javacomm javascript jce jcs jdk jpeg justify -gtk -gtk2 -kde ldap libwww maildir -mbox milter mime ming mmx mozilla mpeg mysql nis noaudio nomac pam pear perl pdflib php png python -qt ruby ruby18 samba -sdl session simplexml shared sharedext smtp snmp soap spl ssl -svga t1lib tcpd -tcltk tidy tiff tokenizer truetype vhosts X xinerama xml xml2 xmlrpc -xmms xpm xsl zlib" I will attach my /var/log/portage logs for freetype gd php & mod_php as well.
Created attachment 57429 [details] 4020-freetype-2.1.9-r1.log
Created attachment 57430 [details] 4021-gd-2.0.32.log
Created attachment 57431 [details] 4022-php-5.0.3-r1.log
Created attachment 57432 [details] 4023-mod_php-5.0.3-r2.log
Error from apache2/error_log that made me search for the gd/truetype/freetype/php/mod_php error in the first place. [client 192.168.1.55] PHP Fatal error: Call to undefined function ImageTTFText() in watermark.php on line 62, referer: http://tl.bone.ath.cx PHP file that produced that error is as follows: *[root@bordergw:~] cat watermark.php <?php function watermark($img,$text="[date]",$datfmt="Y-m-d",$font="ARIAL.TTF",$font_size=12,$rgbtext="FFFFFF",$rgbtsdw="000000",$hotspot=8,$txp=0,$typ=0,$sxp=1,$syp=1) { $suffx=substr($img,strlen($img)-4,4); if ($suffx==".jpg" || $suffx=="jpeg" || $suffx==".png") { $text=str_replace("[date]",date($datfmt),$text); if ($suffx==".jpg" || $suffx=="jpeg") { $image=imagecreatefromjpeg($img); } if ($suffx==".png") { $image=imagecreatefrompng($img); } $rgbtext=HexDec($rgbtext); $txtr=floor($rgbtext/pow(256,2)); $txtg=floor(($rgbtext%pow(256,2))/pow(256,1)); $txtb=floor((($rgbtext%pow(256,2))%pow(256,1))/pow(256,0)); $rgbtsdw=HexDec($rgbtsdw); $tsdr=floor($rgbtsdw/pow(256,2)); $tsdg=floor(($rgbtsdw%pow(256,2))/pow(256,1)); $tsdb=floor((($rgbtsdw%pow(256,2))%pow(256,1))/pow(256,0)); $coltext = imagecolorallocate($image,$txtr,$txtg,$txtb); $coltsdw = imagecolorallocate($image,$tsdr,$tsdg,$tsdb); if ($hotspot!=0) { $ix=imagesx($image); $iy=imagesy($image); $tsw=strlen($text)*$font_size/imagefontwidth($font)*3; $tsh=$font_size/imagefontheight($font); switch ($hotspot) { case 1: $txp=$txp; $typ=$tsh*$tsh+imagefontheight($font)*2+$typ; break; case 2: $txp=floor(($ix-$tsw)/2); $typ=$tsh*$tsh+imagefontheight($font)*2+$typ; break; case 3: $txp=$ix-$tsw-$txp; $typ=$tsh*$tsh+imagefontheight($font)*2+$typ; break; case 4: $txp=$txp; $typ=floor(($iy-$tsh)/2); break; case 5: $txp=floor(($ix-$tsw)/2); $typ=floor(($iy-$tsh)/2); break; case 6: $txp=$ix-$tsw-$txp; $typ=floor(($iy-$tsh)/2); break; case 7: $txp=$txp; $typ=$iy-$tsh-$typ; break; case 8: $txp=floor(($ix-$tsw)/2); $typ=$iy-$tsh-$typ; break; case 9: $txp=$ix-$tsw-$txp; $typ=$iy-$tsh-$typ; break; } } ImageTTFText($image,$font_size,0,$txp+$sxp,$typ+$syp,$coltsdw,$font,$text); ImageTTFText($image,$font_size,0,$txp,$typ,$coltext,$font,$text); if ($suffx==".jpg" || $suffx=="jpeg") { header("Content-type: image/jpg"); imagejpeg($image); } if ($suffx==".png") { header("Content-type: image/png"); imagepng($image); } imagedestroy($image); } } if (isset($wmimg)) { if (!isset($wmtext)) {$wmtext="[date]";} if (!isset($wmdatfmt)) {$wmdatfmt="Y-m-d";} if (!isset($wmfont)) {$wmfont="ARIAL.TTF";} if (!isset($wmfont_size)) {$wmfont_size=12;} if (!isset($wmrgbtext)) {$wmrgbtext="FFFFFF";} if (!isset($wmrgbtsdw)) {$wmrgbtsdw="000000";} if (!isset($wmhotspot)) {$wmhotspot=8;} if (!isset($wmtxp)) {$wmtxp=0;} if (!isset($wmtyp)) {$wmtyp=0;} if (!isset($wmsxp)) {$wmsxp=1;} if (!isset($wmsyp)) {$wmsyp=1;} watermark($wmimg,$wmtext,$wmdatfmt,$wmfont,$wmfont_size,$wmrgbtext,$wmrgbtsdw,$wmhotspot,$wmtxp,$wmtyp,$wmsxp,$wmsyp); } ?> This script creates a dynamic watermark across an image.
Hi, Could you please retest this against the new dev-lang/php package, available in the Gentoo PHP Overlay [1]? [1] http://svn.gnqs.org/projects/gentoo-php-overlay/ Many thanks, Stu
User response needed here. Please, see comment #12 and report back.
All works perfectly with latest dev-lang/php-5.2.6-r7. USE flags: dev-lang/php* -* apache2 -threads bcmath ctype curl ftp freetype gd hash iconv ldap memlimit mysql mysqli pcre pdo pdo-external posix postgres session simplexml sqlite ssl tokenizer truetype xml xmlreader xmlrpc xmlwriter zlib unicode With gd 2.0.35 installed: media-libs/gd -* jpeg png truetype With freetype 2.3.7 installed.