From: david dot schneider at spaboom dot com
Operating system: OS X
PHP version: 5.2.5
PHP Bug Type: GD related
Bug description: Calls to imagettftext crash
Description:
------------
Calls to imagettftext will always fail with no error on Leopard 10.5.2
when run under Apache 2 (bundled GD library).
The Apache error log reveals:
Break on
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__()
to debug.
[Mon Mar 24 16:12:05 2008] [notice] child pid 74505 exit signal Trace/BPT
trap (5)
It is important to note that the code works as expected in the CLI version
of PHP.
Reproduce code:
---------------
<?php
header("Content-type: image/png");
$im = imagecreatetruecolor(400, 30);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $black);
$font = '/[path to font]/Verdana.ttf'; // any font
imagettftext ($im, 10, 0, 10, 10, $white, $font, 'My Text');
imagepng($im);
imagedestroy($im);
?>
Expected result:
----------------
A black box with the words "My Text" in white letters
Actual result:
--------------
No output is produced
--
Edit bug report at http://bugs.php.net/?id=44524&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44524&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44524&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44524&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44524&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44524&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44524&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44524&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44524&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44524&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44524&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44524&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44524&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44524&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44524&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44524&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44524&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44524&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44524&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44524&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44524&r=mysqlcfg