From:             ms at mac-specialist dot com
Operating system: OS X 10.5.3
PHP version:      5.2.6
PHP Bug Type:     GD related
Bug description:  Calls to imagettftext crash

Description:
------------
Same exact problem as Bug #44524, which has been written off as bogus. 
IT IS NOT BOGUS...

Problem:
------------
Calls to imagettftext always fail with no error on Leopard 10.5.3
when run under MacPorts Apache 2.2.6, PHP 5.2.5 and the GD library.

Originally I tried the "PHP Form image verification" example at :

http://www.reconn.us/content/view/28/49/

I then tried example ( 1 ) found on http://us.php.net/imagettftext

Both examples failed to display the results and provided not visible 
error, so I fired up the ZEND DEBUGGER and that is when I found the 
culprit, I then checked the Apache error log and found...

Reproduce code:
---------------
<?php
// This is example ( 1 ) found on http://us.php.net/imagettftext

//Set the content-type
header("Content-type:image/png");

//Create the image
$image=imagecreatetruecolor(400,30);

//Create some colors
$white=imagecolorallocate($image,255,255,255);
$grey=imagecolorallocate($image,128,128,128);
$black=imagecolorallocate($image,0,0,0);
imagefilledrectangle($image,0,0,399,29,$white);

//The text to draw
$text='Testing...';
//Replace path by your own font path
// $font='fonts/10.ttf';
$font='/[path to font]/Arial.ttf';

//Add some shadow to the text
imagettftext($image,20,0,11,21,$grey,$font,$text);

//Addthetext
imagettftext($image,20,0,10,20,$black,$font,$text);

//Using imagepng()results in clearer text compared with imagejpeg()
imagepng($image);
imagedestroy($image);
?>



Expected result:
----------------
Small image containing "Testing..."

Actual result:
--------------
Checking the Apache error log shows many instances of :

Break on 
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTION
ALITY___YOU_MUST_EXEC__() to debug.

[Sun Jul 06 00:45:18 2008] [notice] child pid 2990 exit signal Trace/BPT 
trap (5)

When I trace Using ZEND DEBUGGER the call to imagettftext shows where 
the break in execution occurs.





-- 
Edit bug report at http://bugs.php.net/?id=45437&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45437&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45437&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45437&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45437&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45437&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45437&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45437&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45437&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45437&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45437&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45437&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45437&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45437&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45437&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45437&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45437&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45437&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45437&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45437&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45437&r=mysqlcfg

Reply via email to