ID:               45437
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ms at mac-specialist dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         GD related
 Operating System: OS X 10.5.3
 PHP Version:      5.2.6
-Assigned To:      
+Assigned To:      pajoye
 New Comment:


Please provide a link to the font you use.

Also you may send the header right before the PNG generation:

header("Content-type:image/png");
imagepng($image);
imagedestroy($image);


You may look at the contents of the page (show source), If it is a
blank page, it may contain error messages not displayed because of the
Content-Type.


Previous Comments:
------------------------------------------------------------------------

[2008-07-06 06:27:26] ms at mac-specialist dot com

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 this bug report at http://bugs.php.net/?id=45437&edit=1

Reply via email to