ich habe ein paar Scripts getesttet, die ein Bild dynamisch generieren sollten. Hat leider ein keinem Fall funktioniert.
Code: Select all
<?
Header("Content-type: image/png");
$image = imagecreate(100,20);
$farbe_body=imagecolorallocate($image,0x2c,0x6D,0xAF);
$font_c = imagecolorallocate($image,255,255,255);
Imagettftext($image, 12, 0, 6, 16, $font_c, "comic.ttf", "Testtext");
Imagepng($image);
ImageDestroy($image);
?>
Code: Select all
<?php
Header ("Content-type: image/gif");
$im = imagecreate (400, 30);
$black = ImageColorAllocate ($im, 0, 0, 0);
$white = ImageColorAllocate ($im, 255, 255, 255);
ImageTTFText ($im, 20, 0, 10, 20, $white, "comic.ttf", "Teste... Omega: Ω");
ImageGif ($im);
ImageDestroy ($im);
?>
<br />
<b>Warning</b>: Could not find/open font in <b>/home/www/web1/html/buttex.php</b> on line <b>6</b><br />
<br />
<b>Fatal error</b>: Call to undefined function: imagegif() in <b>/home/www/web1/html/buttex.php</b> on line <b>7</b><br />
Woran kann das liegen? Meine phpinfo sagt mir:
'./configure' '--prefix=/usr/share' '--datadir=/usr/share/php' '--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--with-_lib=lib' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-bcmath' '--enable-calendar' '--enable-ctype' '--enable-dbase' '--enable-discard-path' '--enable-exif' '--enable-filepro' '--enable-force-cgi-redirect' '--enable-ftp' '--enable-gd-imgstrttf' '--enable-gd-native-ttf' '--enable-inline-optimization' '--enable-magic-quotes' '--enable-mbstr-enc-trans' '--enable-mbstring' '--enable-memory-limit' '--enable-safe-mode' '--enable-shmop' '--enable-sigchild' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-versioning' '--enable-wddx' '--enable-yp' '--with-bz2' '--with-dom=/usr/include/libxml2' '--with-ftp' '--with-gdbm' '--with-gettext' '--with-gmp' '--with-imap=yes' '--with-iodbc' '--with-jpeg-dir=/usr' '--with-ldap=yes' '--with-mcal=/usr' '--with-mcrypt' '--with-mysql=/usr' '--with-ndbm' '--with-pgsql=/usr' '--with-png-dir=/usr' '--with-qtdom=/usr/lib/qt2' '--with-snmp' '--with-t1lib' '--with-tiff-dir=/usr' '--with-ttf' '--with-freetype-dir=yes' '--with-xml' '--with-xpm-dir=/usr/X11R6' '--with-zlib=yes' '--with-gd=shared' '--with-openssl' '--with-curl' '--with-swf=./dist/' '--with-imap-ssl' '--enable-xslt' '--with-xslt-sablot' '--with-mm' '--with-apxs=/usr/sbin/apxs' 'i586-suse-linux'
Ist doch alles vorhanden, oder?
gd
----
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
Würde mich freuen, wenn mir jemand einen Tipp geben kann oder sagen woran es liegt.
Viele Grüße & vielen Dank
Steffen