[Solved] could not find open font PHP GD
Although GD is installed, you are unable to view images created by the PHP GD library.
The following error is displayed in the error logs:
[function.imagettftext]: Could not find/open font
To resolve this issue, add ./ before the font name.
For example, if your script has $font = 'arial.ttf';
Change this line to $font = "./arial.ttf";
The images are now displayed on the web page.
Thanks to Dagondesign.com, here's a neat script to check if your server has GD enabled
<?php
/* Displays details of GD support on your server */
echo '<div >';
echo '<p >GD is ';
if (function_exists("gd_info")) {
echo '<span >supported</span> by your server!</p>';
$gd = gd_info();
foreach ($gd as $k => $v) {
echo '<div >';
echo '<span >' . $k . '</span> ';
if ($v)
echo '<span >Yes</span>';
else
echo '<span >No</span>';
echo '<div ><!-- --></div></div>';
}
} else {
echo '<span >not supported</span> by your server!</p>';
}
echo '</div>';
?>