Share Image and XAMPP 1.6.2
Posted: Thu Jun 21, 2007 11:08 pm
Not really a bug but a case of changing php.
Share Image was working fine until i did an update to xampp version 1.6.2 with PHP 5.2.2
The url http://mysite/netjukebox/image.php was giving the following messages:
Warning: imagettftext() [function.imagettftext]: Invalid font filename in C:\Program Files\xampp\htdocs\netjukebox\image.php on line 183
Warning: imagettftext() [function.imagettftext]: Invalid font filename in C:\Program Files\xampp\htdocs\netjukebox\image.php on line 184
Warning: imagettftext() [function.imagettftext]: Invalid font filename in C:\Program Files\xampp\htdocs\netjukebox\image.php on line 185
and a lot of characters.
Changing the following lines in image.php
imagettftext($dst_image, 9, 0, 55, 13, $font_color, 'arial.ttf', $text);
imagettftext($dst_image, 9, 0, 55, 30, $font_color, 'arial.ttf', $bitmap['artist']);
imagettftext($dst_image, 9, 0, 55, 47, $font_color, 'arial.ttf', $bitmap['album']);
in
imagettftext($dst_image, 9, 0, 55, 13, $font_color, 'C:\WINDOWS\Fonts\arial.ttf', $text);
imagettftext($dst_image, 9, 0, 55, 30, $font_color, 'C:\WINDOWS\Fonts\arial.ttf', $bitmap['artist']);
imagettftext($dst_image, 9, 0, 55, 47, $font_color, 'C:\WINDOWS\Fonts\arial.ttf', $bitmap['album']);
did solve the problem for me.
"Newer PHP versions seems to have a problem with using the GDFONTPATH evironment variable" was what i found from googling.
Share Image was working fine until i did an update to xampp version 1.6.2 with PHP 5.2.2
The url http://mysite/netjukebox/image.php was giving the following messages:
Warning: imagettftext() [function.imagettftext]: Invalid font filename in C:\Program Files\xampp\htdocs\netjukebox\image.php on line 183
Warning: imagettftext() [function.imagettftext]: Invalid font filename in C:\Program Files\xampp\htdocs\netjukebox\image.php on line 184
Warning: imagettftext() [function.imagettftext]: Invalid font filename in C:\Program Files\xampp\htdocs\netjukebox\image.php on line 185
and a lot of characters.
Changing the following lines in image.php
imagettftext($dst_image, 9, 0, 55, 13, $font_color, 'arial.ttf', $text);
imagettftext($dst_image, 9, 0, 55, 30, $font_color, 'arial.ttf', $bitmap['artist']);
imagettftext($dst_image, 9, 0, 55, 47, $font_color, 'arial.ttf', $bitmap['album']);
in
imagettftext($dst_image, 9, 0, 55, 13, $font_color, 'C:\WINDOWS\Fonts\arial.ttf', $text);
imagettftext($dst_image, 9, 0, 55, 30, $font_color, 'C:\WINDOWS\Fonts\arial.ttf', $bitmap['artist']);
imagettftext($dst_image, 9, 0, 55, 47, $font_color, 'C:\WINDOWS\Fonts\arial.ttf', $bitmap['album']);
did solve the problem for me.
"Newer PHP versions seems to have a problem with using the GDFONTPATH evironment variable" was what i found from googling.