been trying to use imagettftext however it will not display anything on the screen.
running the script through php standalone binary does not report any errors and a jpeg is produced however its a blank canvas.
tried the example i picked up off the site examoples and that does the same.
heres the example that does not work.
?>
bash-2.05# more test4.php
<?php
header("Content-type: image/jpeg");
$im = imagecreate(400,30);
$white = imagecolorallocate($im, 255,255,255);
$black = imagecolorallocate($im, 0,0,0);
// Replace path by your own font path
imagettftext($im, 20, 0, 10, 20, $black, "/web/fonts/arial.ttf", "Testing... O
mega: &#937;");
imagejpeg($im);
imagedestroy($im);
?>
however other code not using imagettftext
for example
<?php
header("Content-type: image/jpeg");
$image = imagecreate(200,200);
$maroon = ImageColorAllocate($image,100,0,0);
$white = ImageColorAllocate($image,255,255,255);
ImageFilledRectangle($image,0,0,200,200,$white);
ImageRectangle($image,10,10,190,190,$maroon);
ImageFilledRectangle($image,50,50,150,150,$maroon);
Imagejpeg($image);
ImageDestroy($image);
?>
works fine.
i do have freetype 1.3 compiled in
heres my phpinfo output
ps i am a newby to php
regards peter
ps this is now the php4-STABLE-200309301330 version
tried with the general release and its just the same.
PHP Version 4.3.3
System SunOS ossi8 5.9 Generic_112233-05 sun4u
Build Date Oct 1 2003 09:54:37
Configure Command './configure' '--prefix=/opt/OSSIphp' '--with-apxs2=/opt/OSSIapache/bin/apxs' '--enable-embed=TYPE=shared' '--enable-force-cgi-redirect' '--enable-discard-path' '--enable-fastcgi' '--disable-ipv6' '--with-openssl=/opt/OSSIssl/' '--with-zlib' '--with-mysql=/opt/OSSImysql' '--with-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/opt/OSSIjpeg/' '--with-png-dir=/opt/OSSIpng' '--with-ttf=/opt/OSSIfreetype'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0
openssl
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7b 10 Apr 2003
overload
User-Space Object Overloading Support enabled
pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 4.3 21-May-2003
posix
Revision $Revision: 1.51.2.2 $
session
Session Support enabled
Registered save handlers files user
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 Off Off
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off
standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/lib/sendmail -t -i
Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP PHP
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
user_agent no value no value
tokenizer
Tokenizer Support enabled
xml
XML Support active
XML Namespace Support active
EXPAT Version 1.95.6
zlib
ZLib Support enabled
Compiled Version 1.1.3
Linked Version 1.1.3
Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value
Additional Modules
Module Name
Environment
Variable Value
HOME /
HOSTNAME ossi8
HOSTTYPE sparc
HZ no value
LD_LIBRARY_PATH /opt/OSSIapache/lib:
LOGNAME root
MACHTYPE sparc-sun-solaris2.9
MANPATH :/opt/OSSIapache/man:/opt/OSSImysql/man
OLDPWD /usr/ossi/src
OSTYPE solaris2.9
PATH /opt/OSSIperl/bin:/opt/OSSIperl/lib:/opt/OSSIgcc/bin:/opt/sfw/bin:/opt/sfw/lib:/usr/ccs/bin:/usr/ccs/lib:/opt/OSSImysql/bin:/opt/OSSIbdb/lib:/opt/OSSIphp/bin:/usr/sbin:/usr/bin
PWD /usr/ossi/src/php4-STABLE-200309301330
SHELL /sbin/sh
SHLVL 1
TERM xterm
TZ WET
_ /etc/rc3.d/S99apachectl