Home » Text » Text_CAPTCHA » Bug #3487
Default value of options doesn't work
Details
| Submitted | 2005-02-16 03:41 UTC |
|---|---|
| From | emailwastefilter-pearphpnet at yahoo dot com |
| Status | No Feedback |
| Package | Text_CAPTCHA |
| PHP Version | 4.3.10 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[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