This saga won't end... (3.0.14 or 4b3), GD 1.7.3, freetype 1.3.1, no text
| From: | Jason Belich | Date: | Sat, 05 Feb 2000 23:38:32 +0000 |
| Subject: | This saga won't end... (3.0.14 or 4b3), GD 1.7.3, freetype 1.3.1, no text | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9863@lists.php.net to get a copy of this message | ||
Having a highly annoying problem with Imagettftext() in php3.0.14 _and_ php4b3.
Everytime I call Imagettftext() I get a "Document contained no data" error.
This happens regardless whether there is a print or echo statement in the script
either before or after the Imagettftext() call. I got a hunch it's problem
(even though the backtraces give no real clue) with GD/freetype but I've
recompiled both of them several times/several versions with no luck. Any ideas?
Setup: Mandrake 7.0, apache 3.0.11, php 3.0.14, GD 1.7.3, Freetype 1.3.1
Here's the script:
<?php
//error_reporting(E_ALL);
require("config.php3");
Header("Content-type: image/png");
if (!is_file($imagebasefile.urlencode($b).".png")) {
$image = imagecreate(195, 25);
$blue = imagecolorallocate($image, 0, 9, 123);
$color = imagecolorallocate($image, 211,219,155);
Imagettftext($image, 18,0,3,18,$color,
"/usr/share/fonts/ttf/western/Bluehigh.ttf", stripslashes($b));
// print($php_errormsg);
Imagepng($image, $imagebasefile.urlencode($b).".png");
imagedestroy($image);
}
readfile($imagebasefile.urlencode($b).".png");
?>
here's the backtrace in php3:
GNU gdb 19991116
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux"...
(gdb) run -X
Starting program: /usr/local/apache-php3/bin/httpd -X
Program received signal SIGSEGV, Segmentation fault.
0x404518a4 in mysql_fetch_row () from /usr/lib/libmysqlclient.so.6
(gdb) bt
#0 0x404518a4 in mysql_fetch_row () from /usr/lib/libmysqlclient.so.6
#1 0x4045151c in mysql_refresh () from /usr/lib/libmysqlclient.so.6
#2 0x40451ac8 in end_server () from /usr/lib/libmysqlclient.so.6
#3 0x40424f44 in Compute_Funcs () from /usr/lib/libttf.so.2
#4 0x40424d9a in Free_Project () from /usr/lib/libttf.so.2
#5 0x4046f57e in skip_url_prefix () from /usr/lib/libldap.so.1
#6 0x40402fad in png_init_read_transformations () from /usr/lib/libpng.so.2
#7 0x40403336 in png_do_read_transformations () from /usr/lib/libpng.so.2
#8 0x403fff1f in png_set_filter_heuristics () from /usr/lib/libpng.so.2
#9 0x403fffae in png_set_filter_heuristics () from /usr/lib/libpng.so.2
#10 0x80546f9 in ap_invoke_handler ()
#11 0x806894f in process_request_internal ()
#12 0x80689ba in ap_process_request ()
#13 0x805fc36 in child_main ()
#14 0x805fdf1 in make_child ()
#15 0x805ff6c in startup_children ()
#16 0x80605cd in standalone_main ()
#17 0x8060dfc in main ()
#18 0x400c49ee in __libc_start_main (main=0x8060a64 <main>, argc=2,
argv=0xbffff994, init=0x804e828 <_init>,
fini=0x8096134 <_fini>, rtld_fini=0x4000a570 <_dl_fini>,
stack_end=0xbffff98c)
at ../sysdeps/generic/libc-start.c:90
(gdb) quit
Here's my backtrace in php4b3:
GNU gdb 19991116
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux"...
(gdb) run -X
Starting program: /usr/local/apache-php4/bin/httpd -X
Program received signal SIGSEGV, Segmentation fault.
0x4047e634 in ASAtomInitialize () from /usr/lib/libFdfTk.so
(gdb) bt
#0 0x4047e634 in ASAtomInitialize () from /usr/lib/libFdfTk.so
#1 0x4047e2ac in ASAtomInitialize () from /usr/lib/libFdfTk.so
#2 0x4047e858 in ASAtomInitialize () from /usr/lib/libFdfTk.so
#3 0x4047d5de in ASScanInt32 () from /usr/lib/libFdfTk.so
#4 0x4047d437 in ASTicks () from /usr/lib/libFdfTk.so
#5 0x40456882 in DCTEcode_color () from /usr/lib/libFdfTk.so
#6 0x4042ea7b in InnerCosDocDispose () from /usr/lib/libFdfTk.so
#7 0x4046d463 in FixedMatrixTranslate () from /usr/lib/libFdfTk.so
#8 0x4046dacf in FixedMatrixTransformRect () from /usr/lib/libFdfTk.so
#9 0x4046db23 in FixedMatrixTransformRect () from /usr/lib/libFdfTk.so
#10 0x80546f9 in ap_invoke_handler () at lex.icap_yy.c:1000
#11 0x806894f in process_request_internal () at lex.icap_yy.c:1000
#12 0x80689ba in ap_process_request () at lex.icap_yy.c:1000
#13 0x805fc36 in child_main () at lex.icap_yy.c:1000
#14 0x805fdf1 in make_child () at lex.icap_yy.c:1000
#15 0x805ff6c in startup_children () at lex.icap_yy.c:1000
#16 0x80605cd in standalone_main () at lex.icap_yy.c:1000
#17 0x8060dfc in main () at lex.icap_yy.c:1000
#18 0x400c49ee in __libc_start_main (main=0x8060a64 <main>, argc=2,
argv=0xbffff994, init=0x804e828 <_init>, fini=0x8096134 <_fini>,
rtld_fini=0x4000a570 <_dl_fini>, stack_end=0xbffff98c)
at ../sysdeps/generic/libc-start.c:90
(gdb) quit
Here's my configure script for php3:
./configure \
--with-apxs=/usr/local/apache-php3/bin/apxs\
--prefix=/usr \
--with-gd \
--with-ttf \
--with-dbase \
--with-zlib \
--with-pdflib=/usr \
--with-config-file-path=/etc/httpd/conf \
--disable-debug \
--enable-magic-quotes \
--enable-debugger \
--enable-bcmath \
--enable-track-vars \
--enable-sysvshm \
--enable-sysvsem \
--with-mysql \
--with-ldap=/usr \
--with-imap=/usr \
--with-gdbm \
--with-zlib-dir=/usr \
--with-jpeg-dir=/usr \
--with-tiff-dir=/usr \
--with-mcal=/usr \
--with-ftp \
--with-fdftk \
--with-xml
Here's my configure script for php4b3
./configure \
--with-apxs=/usr/local/apache-php4/bin/apxs\
--prefix=/usr \
--with-gd=/usr \
--with-ttf \
--with-dbase \
--with-zlib \
--with-pdflib=/usr \
--with-config-file-path=/etc/httpd/conf \
--disable-debug \
--enable-magic-quotes \
--enable-debugger \
--enable-bcmath \
--enable-track-vars \
--with-mysql \
--with-ldap=/usr \
--with-imap=/usr \
--with-gdbm \
--with-zlib-dir=/usr \
--with-jpeg-dir=/usr \
--with-tiff-dir=/usr \
--with-mcal=/usr \
--with-ftp \
--enable-versioning \
--enable-trans-sid \
--with-fdftk \
--with-xml \
--enable-sysvshm \
--enable-sysvsem