|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2002-05-13 19:15 UTC] hubweb at hotmail dot com
 Today I installed PHP 4.2.1 and did everything I had to do... copy DLLs to Winnt\System32, configure Apache, etc. When I started Apache, I got an error concerning php_gd2.dll : it can't be loaded. I think there is an error of compilation in Win32 binaries of PHP 4.2.1. Thanks PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 10:00:02 2025 UTC | 
You need to set the path to you fonts dir. Here is a fully working example: <?php putenv('GDFONTPATH=c:\winnt\fonts'); header ("Content-type: image/jpeg"); $im = imagecreate (400, 30); $black = imagecolorallocate ($im, 0, 0, 0); $white = imagecolorallocate ($im, 255, 255, 255); imagettftext ($im, 20, 0, 10, 20, $white, 'arial', "Testing...Omega: Ω"); imagejpeg ($im); imagedestroy ($im); ?>