Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.2

Bug #3487 Default value of options doesn't work
Submitted: 2005-02-16 03:41 UTC
From: emailwastefilter-pearphpnet at yahoo dot com Assigned:
Status: No Feedback Package: Text_CAPTCHA
PHP Version: 4.3.10 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-02-16 03:41 UTC] emailwastefilter-pearphpnet at yahoo dot com
Description: ------------ Default value of the options variable doesn't provide useful defaults. While the package might not be able to provide font files (though freefont comes to mind), the default font path is not useful as different modules seem to have different ideas of what './' means. It would be better if the script aborts here if a real file doesn't exist. Using apache/php/pear on Debian unstable as of 2005-02-15. Reproduce code: --------------- <?php require_once 'Text/CAPTCHA.php'; $captcha = Text_CAPTCHA::factory('Image'); $captcha->init(); $image = $captcha->getCAPTCHA(); header('Content-Type: image/png'); ImagePNG($image); ?> Expected result: ---------------- A PNG image Actual result: -------------- Warning: imagettfbbox(): Could not find/open font in /usr/share/php/Image/Text.php on line 766 Warning: imagettfbbox(): Could not find/open font in /usr/share/php/Image/Text.php on line 805 Warning: imagettfbbox(): Could not find/open font in /usr/share/php/Image/Text.php on line 766 Warning: imagettfbbox(): Could not find/open font in /usr/share/php/Image/Text.php on line 805 Warning: imagettftext(): Could not find/open font in /usr/share/php/Image/Text.php on line 965

Comments

 [2005-02-19 14:59 UTC] wenz
what default values would you recommend?
 [2007-04-18 15:41 UTC] osde8info (Clive Darra)
$ sudo -i # cd /usr/share/php/Image/Canvas # ln -s /usr/share/fonts/truetype/msttcorefonts/ Fonts $