Summary: | mod_php 5.0.3 gd freetype no support | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Romang <zataz> |
Component: | Current packages | Assignee: | PHP Bugs <php-bugs> |
Status: | VERIFIED TEST-REQUEST | ||
Severity: | normal | CC: | barzog, chtekk |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 60438 | ||
Attachments: |
Mod_PHP 5.0.3 config.log file
Emerge mod_php build log 4020-freetype-2.1.9-r1.log 4021-gd-2.0.32.log 4022-php-5.0.3-r1.log 4023-mod_php-5.0.3-r2.log |
Description
Romang
2005-01-03 08:57:36 UTC
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. |